Aryavartpedia aryavratpediawiki https://aryavartpedia.online/wiki/Main_Page MediaWiki 1.41.0 first-letter Media Special Talk User User talk Aryavartpedia Aryavartpedia talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Campaign Campaign talk Module Module talk Indianscience 0 646 1316 2008-11-22T09:44:11Z History of science and technology on the Indian subcontinent>JSR 0 moved [[Template:Indianscience]] to [[Template:Science in India]] wikitext text/x-wiki #REDIRECT [[Template:Science in India]] 17fab60a4ce0452508f0e6e0c947846841d8ea9e HistoryOfSouthAsia 0 643 1310 2011-09-02T04:07:11Z History of science and technology on the Indian subcontinent>Diannaa 0 Unprotected Template:HistoryOfSouthAsia wikitext text/x-wiki #REDIRECT [[Template:History of South Asia]] cb5a1c1e321cc478f3af3183c9b50501c7d0998c Pagetype 0 583 1190 2014-07-09T08:29:38Z History of science and technology on the Indian subcontinent>Callanecc 0 Changed protection level of Template:Pagetype: [[WP:High-risk templates|Highly visible template]]: With more than 5.5 million transclusions and cascade protections this should be full protected as well ([Edit=Allow only administrators] (indefinite) [Move= wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> b8e6aa66678cd57877ea2c607372a45070f030a7 Template:When on basepage 10 556 1132 2014-09-30T08:52:52Z Infobox-person>Sardanaphalus 0 Sardanaphalus moved page [[Template:Basepage subpage]] to [[Template:When on basepage]]: Per move request wikitext text/x-wiki {{#switch: <!--If no or empty "page" parameter then detect basepage/subpage/subsubpage--> {{#if:{{{page|}}} | {{#if:{{#titleparts:{{{page}}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{{page}}}|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | subpage | basepage }} }} }} | basepage = {{{1|}}} | subpage = {{{2|}}} | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> }}<!--End switch--><noinclude> {{Documentation}} </noinclude> cf4dc92df647a26ab0ce149772a1fe3ac6c3dfc0 Template:Br separated entries 10 413 836 2015-05-26T18:06:33Z Infobox-person>Izkala 0 Switch to using [[Module:Separated entries]]; leading and trailing whitespace and newlines are now trimmed wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br}}<noinclude> {{documentation}} </noinclude> 2019f7fc383259e70d66e43cbd97a43d20889f1b IAST 0 637 1298 2015-09-06T18:18:13Z History of science and technology on the Indian subcontinent>NeilN 0 Changed protection level of Template:IAST: [[WP:High-risk templates|Highly visible template]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki {{transl|sa|IAST|{{{1}}}}}<noinclude> {{documentation}} </noinclude> 1c8047208bfafb1a6a3d8d26eccc3df12e9ae86c Nowrap 0 579 1182 2015-11-28T10:13:53Z History of science and technology on the Indian subcontinent>Edokter 0 Adapt comment; edits inside noinclude blocks should not affect job queue, but won't kill parser either way. wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> 5d0dc6b6d89b37f4356242404f46138a4017f015 Template:PAGENAMEBASE 10 434 882 2016-03-06T09:37:56Z Infobox-person>Cabayi 0 per edit request & discussion wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f Template:Tlp 10 531 1082 2017-01-23T13:35:17Z Infobox-person>MSGJ 0 MSGJ moved page [[Template:Tlp]] to [[Template:Template link with parameters]]: expand name of template wikitext text/x-wiki #REDIRECT [[Template:Template link with parameters]] {{R from move}} 3867e4ef4fe637ce8530859b5486b23e916d0b8a See also 0 603 1230 2017-02-02T05:40:25Z History of science and technology on the Indian subcontinent>Nihiltres 0 Updated from sandbox to use [[Module:Labelled list hatnote]] wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|See also}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 74d2ab6a0df5605fbe2085c405925ec659be52b7 Template:Wikidata image 10 498 1010 2017-02-08T17:10:10Z Infobox-person>Primefac 0 TFD closed as keep (using [[User:Evad37/XFDcloser|XFDcloser]]) wikitext text/x-wiki {{#if:{{NAMESPACE}}|| {{#if:{{{1|}}} | {{#if:{{#property:P18}} | {{#ifeq:{{filepath:{{{1|}}} }}|{{filepath:{{#property:P18}} }} | | }} | {{#if:{{#property:P41}}{{#property:P94}}{{#property:P117}}{{#property:P154}}{{#property:P242}} | | }} }} | {{#if:{{#property:P18}} | {{#if:{{{2|}}} | | [[Category:No local image but image on Wikidata]] }} | }} }} }}<noinclude> {{doc}} </noinclude> 572e9efe168616980e2b149a2536e292dfbee5d0 Module:ParameterCount 828 515 1044 2017-02-11T14:32:57Z Infobox-person>Mr. Stradivarius 0 Protected "[[Module:ParameterCount]]": [[WP:High-risk templates|High-risk Lua module]]: 20,000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain -- This module produces a count of all the arguments passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a string is blank local function isBlank(s) return not s:find('%S') end -- Tests whether a string is a valid positional key, and if so, returns it. If -- the key is invalid, this returns nil. local function isPositionalKey(s) s = trim(s) if s:find('^[1-9][0-9]*$') then return tonumber(s) end end -- Return the count of all arguments for which testFunc returns a truthy value. local function count(args, testFunc) local ret = 0 for key, val in pairs(args) do if testFunc(key, val) then ret = ret + 1 end end return ret end -- Check shared arguments and get the parent argument count. local function main(frame, testFunc) local blankifiedTestFunc if yesno(frame.args.checkblanks) ~= false then -- Extend the test function to check for blanks as well. blankifiedTestFunc = function (key, val) if not isBlank(val) then return testFunc(key, val) end end else blankifiedTestFunc = testFunc end return count(frame:getParent().args, blankifiedTestFunc) end return { -- Called with {{#invoke:ParameterCount|all}} -- All specified parameters are counted, even those not supported by the -- template. all = function (frame) return main(frame, function () return true end) end, -- Called with {{#invoke:ParameterCount|main}} -- Users can specify a list of parameters to check, and a list of Lua -- Ustring patterns to check each parameter against. main = function (frame) local args = frame.args local keys, patterns = {}, {} -- Get key list for i, key in ipairs(args) do local positionalKey = isPositionalKey(key) if positionalKey then keys[positionalKey] = true else keys[trim(key)] = true end end -- Get patterns do local function getPattern(i) local pattern = args['pattern' .. tostring(i)] if pattern and pattern ~= '' then return pattern end end local i = 1 local pattern = getPattern(i) while pattern do patterns[i] = pattern i = i + 1 pattern = getPattern(i) end end -- Construct the test function local testFunc = function (key, val) if keys[key] then return true end for i, pattern in ipairs(patterns) do if mw.ustring.find(tostring(key), pattern) then return true end end return false end return main(frame, testFunc) end } 63e3811b7a17825c071b1920ce88af06bc1e778d Webarchive 0 625 1274 2017-03-10T21:29:55Z History of science and technology on the Indian subcontinent>Rich Farmbrough 0 wikitext text/x-wiki <includeonly>{{#invoke:webarchive|webarchive}}</includeonly><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 592dc8f562cc0b9c49d38f1ef771b327fe8a5d0a Template:Basepage subpage 10 559 1138 2017-03-12T04:26:29Z Infobox-person>Godsy 0 [[Template:This is a redirect]] has been deprecated, change to [[Template:Redirect category shell]]. wikitext text/x-wiki #REDIRECT [[Template:When on basepage]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 47118a1bed1942b7f143cdff1dec183002fc9f4b Template:Str ≠ len 10 500 1014 2017-03-25T12:38:47Z Infobox-person>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Str ≠ len]]": Allowing template editors on some templates with full protection dating back to pre-[[WP:TPROT|TPROT]] times which aren't too often or too sensitively used. ([Edit=Require template editor access]... wikitext text/x-wiki {{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} != {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 62d778f3efdfb20ede86ceede35feb64ed51fe02 Template:Tomorrow 10 527 1074 2017-03-25T12:38:48Z Infobox-person>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Tomorrow]]": Allowing template editors on some templates with full protection dating back to pre-[[WP:TPROT|TPROT]] times which aren't too often or too sensitively used. ([Edit=Require template editor access] (i... wikitext text/x-wiki {{#switch:{{{1}}} |long={{#time:F"{{{2| }}}"j",{{{2| }}}"Y|+1 day}} |num={{#time:n"{{{2| }}}"j|+1 day}} |#default={{#time:F"{{{2| }}}"j|+1 day}} }}<noinclude>{{Documentation}}</noinclude> 5e44249f064450c1b28daa6959741f668465bb5e Harvnb 0 621 1266 2017-04-07T19:22:02Z History of science and technology on the Indian subcontinent>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Harvnb]]": Matching redirect target ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT[[Template:Harvard citation no brackets]] 207579e59ab79c1932b97f6a2f1fe1ab8d0a5d2a Template:Side box 10 474 962 2017-04-08T19:24:23Z Infobox-person>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Side box]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> f02d48c7bd2f7bc64e2982d16b3578c99137d27e Side box 0 616 1256 2017-04-08T19:24:23Z History of science and technology on the Indian subcontinent>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Side box]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> f02d48c7bd2f7bc64e2982d16b3578c99137d27e Template:Strong 10 478 970 2017-09-16T03:10:40Z Infobox-person>Matt Fitzpatrick 0 added role parameter and attribute wikitext text/x-wiki <strong {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</strong><noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> a6c6d3b520e2018e19376e2f0e1a72801336d1df Template:Vanchor 10 511 1036 2017-09-16T17:45:37Z Infobox-person>Zzuuzz 0 Changed protection level for "[[Template:Vanchor]]": [[Wikipedia:High-risk templates|High risk template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Visible anchor]] {{Redirect category shell| {{R from template shortcut}} }} 8adbd53dde59b46bf409a2fbda6056f8c0199e9c Template:Crossref 10 503 1020 2017-10-09T12:24:30Z Infobox-person>Xezbeth 0 Protected "[[Template:Crossref]]": [[Wikipedia:High-risk templates|Highly visible]] template redirect ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Crossreference]] {{Rcat shell| {{R from template shortcut}} }} dc4192593ccb8eaa34c0440c4aa712442a06c329 Module:Lang/ISO 639 synonyms 828 397 800 2017-12-13T23:10:47Z Infobox-person>Trappist the monk 0 Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Template:Var 10 519 1058 2017-12-21T13:31:52Z Infobox-person>Izno 0 nix xml lang invocation wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Template:!mxt 10 543 1106 2018-01-11T16:01:48Z Infobox-person>SMcCandlish 0 +class wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example deprecated-content example-bad monospaced example-mono" style="font-family: monospace, monospace; color: #8B0000;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<!--"monospace, monospace" needed per Wikipedia:Typography#The_monospace_'bug'--><noinclude> {{Documentation|Template:Xt/doc}} <!--This category has to be done on a per-template basis, not in the shared docs, since it only apply to four templates in the family.--> [[Category:Programming typing-aid templates]] </noinclude> 123b663ea682585bd66d348c0b22b9356b6082bb Template:Yesno-no 10 481 976 2018-02-13T20:27:17Z Infobox-person>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Yesno-no 0 618 1260 2018-02-13T20:27:17Z History of science and technology on the Indian subcontinent>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Google books 0 611 1246 2018-02-23T16:29:55Z History of science and technology on the Indian subcontinent>Primefac 0 Changed protection level for "[[Template:Google books]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#if:{{{plainurl|{{{plain-url|}}}}}}|https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}}|''[https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}} {{{2|{{{title|{{PAGENAME}}}}}}}}]''{{#if:{{{page|}}}|, p. {{{page}}},}} at [[Google Books]]}}<noinclude>{{Documentation}}</noinclude> 0afd3937437e12049b2123482135d6e8271203b9 Template:Yesno-yes 10 410 828 2018-03-11T01:06:35Z Infobox-person>JJMC89 0 allow subst wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Yesno-yes 0 584 1192 2018-03-11T01:06:35Z History of science and technology on the Indian subcontinent>JJMC89 0 allow subst wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Template:Tag 10 521 1062 2018-07-26T17:17:13Z Infobox-person>SMcCandlish 0 These are called attributes; no one who does HTML calls them "parameters". wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Nobold 0 589 1202 2018-10-23T17:15:13Z History of science and technology on the Indian subcontinent>Frietjes 0 wikitext text/x-wiki <templatestyles src="Nobold/styles.css"/><span class="nobold">{{{1}}}</span><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 9c92b5951772bb26ca0fbe9256418b65e47700dd Template:Template other 10 428 870 2018-12-16T22:06:25Z Infobox-person>Amorymeltzer 0 Changed protection level for "[[Template:Template other]]": [[WP:High-risk templates|Highly visible template]]: Transclusion count has increased dramatically ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Module:Separated entries 828 420 854 2018-12-17T20:54:33Z Infobox-person>Amorymeltzer 0 Changed protection level for "[[Module:Separated entries]]": [[WP:High-risk templates|High-risk Lua module]]: Over 2M transclusions ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) return mw.text.listToText(values, separator, conjunction) end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p e80231ff3de01afd7f62a94e0a34dc1e67504085 Module:Color contrast 828 487 988 2019-01-06T22:38:25Z Infobox-person>Johnuniq 0 fix unintended color2lum global error which is causing errors; clean whitespace Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 488 990 2019-01-24T12:30:11Z Infobox-person>Galobtter 0 Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:WikidataIB/nolinks 828 472 958 2019-01-31T16:27:33Z Infobox-person>RexxS 0 add abbreviations UK and USA Scribunto text/plain local p ={} --[[ The values here are the English sitelinks for items that should not be linked. These 36 are not definitive and may be altered to suit. --]] p.items = { "Australia", "Austria", "Belgium", "Canada", "China", "Denmark", "England", "France", "Germany", "Greece", "Hungary", "Iceland", "India", "Republic of Ireland", "Israel", "Italy", "Jamaica", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Northern Ireland", "Norway", "Poland", "Portugal", "Russia", "Scotland", "South Africa", "Spain", "Sweden", "Switzerland", "Turkey", "United Kingdom", "UK", "United States", "USA", "Wales", } --[[ This provides a convenient way to create a test whether an item is on the list. --]] p.itemsindex = {} for i, v in ipairs(p.items) do p.itemsindex[v] = true end return p d42a1e1cb5d411ab1b578dc0d36aa0266f32b2d6 Nobold/styles.css 0 590 1204 2019-03-03T23:43:41Z History of science and technology on the Indian subcontinent>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } 83e5f0adacf8c7984251f1fd9d11ed82ebaadf03 Template:Mono/styles.css 10 407 822 2019-03-04T00:01:15Z Infobox-person>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Lua 10 547 1114 2019-03-20T22:04:45Z Infobox-person>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Clc 10 549 1118 2019-04-24T04:30:59Z Infobox-person>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Ubl 10 499 1012 2019-09-11T19:30:27Z Infobox-person>Paine Ellsworth 0 convert to shell template wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Template:Infobox person/height 10 494 1002 2019-09-26T15:11:11Z Infobox-person>Frietjes 0 use lua version for efficiency and readability, passes all tests in the testscases so seems fine wikitext text/x-wiki {{#invoke:person height|main}}<noinclude> {{Documentation}} </noinclude> 7e4749e2788885b5a8760fedb7cc278e9a60a85a Template:Mono 10 405 818 2019-10-13T01:15:06Z Infobox-person>Izno 0 implement ifsubst wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:URL 10 485 984 2019-11-18T00:50:36Z Infobox-person>Jonesey95 0 Adding unknown parameter tracking through [[:Category:Pages using URL template with unknown parameters]] using [[Module:check for unknown parameters]] wikitext text/x-wiki <includeonly>{{#invoke:URL|url}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using URL template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:URL]] with unknown parameter "_VALUE_"|ignoreblank=y | 1 | 2 }}<noinclude>{{documentation}}</noinclude> 5671474ce4656f07c5bdc47292d1dcbe9c70317e Template:Unbulleted list 10 414 838 2019-12-09T17:31:16Z Infobox-person>Jonesey95 0 Undid revision 929522913 by [[Special:Contributions/MSGJ|MSGJ]] ([[User talk:MSGJ|talk]]). Reverted, as this change has been shown to have bugs. Discussion continues on talk page. wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Template:Wdib 10 469 952 2019-12-19T17:05:39Z Infobox-person>RexxS 0 Undid revision 931560015 by [[Special:Contributions/RexxS|RexxS]] ([[User talk:RexxS|talk]]) rv test wikitext text/x-wiki {{#invoke:WikidataIB|getValue}}<noinclude> {{documentation}} </noinclude> fa7d9c2bb5c42c526c39cda90ec66adf62985650 Template:Ombox 10 467 948 2020-04-01T06:12:36Z Infobox-person>MusikAnimal 0 1 revision imported wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Module:Arguments 828 9 804 2020-04-01T06:12:40Z Infobox-person>MusikAnimal 0 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Yesno 828 398 802 2020-04-01T06:27:55Z Infobox-person>MusikAnimal 0 Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]]) Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:File link 828 448 910 2020-04-01T06:31:54Z Infobox-person>MusikAnimal 0 Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]]) Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Sandbox other 10 525 1070 2020-04-03T00:08:09Z Infobox-person>Evad37 0 Also match subpage names beginning with "sandbox", per [[Template_talk:Sandbox_other#Template-protected_edit_request_on_28_March_2020|edit request]] wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Sidebar with collapsible lists 0 605 1234 2020-04-23T17:08:31Z History of science and technology on the Indian subcontinent>Plastikspork 0 TFD closed as oppose ([[WP:XFDC|XFDcloser]]) wikitext text/x-wiki {{#invoke: Sidebar | collapsible }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 4bd1f39f9101790ed6e315752e377a8ac7a95869 Template:Cslist 10 522 1064 2020-04-25T18:00:10Z Infobox-person>MusikBot II 0 Protected "[[Template:Cslist]]": [[Wikipedia:High-risk templates|High-risk template or module]] ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <templatestyles src="Cslist/styles.css" />{{#invoke:Cslist |makelist}}<noinclude> {{documentation}} </noinclude> 8de0ef2dc8a52f1f2d050ca747d583cd776a0b84 Module:WikidataIB/titleformats 828 473 960 2020-04-30T16:11:19Z Infobox-person>RexxS 0 add magazine Scribunto text/plain --[[ To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. This submodule lists the entity-ids used in 'instance of' (P31), which allows a module to identify the values that should be formatted. The table p.formats is indexed by entity-id, and contains the value " or '' --]] local p = {} p.italics = { "Q571", -- book "Q13593966", -- literary trilogy "Q277759", -- book series "Q2188189", -- musical work "Q11424", -- film "Q13593818", -- film trilogy "Q24856", -- film series "Q5398426", -- television series "Q482994", -- album "Q169930", -- extended play "Q1760610", -- comic book "Q7889", -- video game "Q7058673", -- video game series "Q25379", -- play "Q2743", -- musical "Q37484", -- epic poem "Q41298", -- magazine } p.quotes = { "Q207628", -- musical composition } p.size = 0 p.formats = {} for i, v in ipairs(p.italics) do p.formats[v] = "''" p.size = p.size + 1 end for i, v in ipairs(p.quotes) do p.formats[v] = '"' p.size = p.size + 1 end return p aecc52ff69e56d315f5b60dc21d02dd94a63dfea Sidebar 0 604 1232 2020-06-04T02:43:13Z History of science and technology on the Indian subcontinent>Primefac 0 TFD closed as keep ([[WP:XFDC|XFDcloser]]) wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Template:Birth date and age 10 501 1016 2020-06-07T01:32:39Z Infobox-person>Uzume 0 update tracking to use [[Module:Wd]] instead of the unmaintained and deprecated [[Module:Wikidata]] wikitext text/x-wiki <includeonly>{{{{{♥|safesubst:}}}#invoke:age|birth_date_and_age}}{{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Birth date and age]] with unknown parameter "_VALUE_"|unknown={{main other|[[Category:Pages using birth date and age template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|1|2|3|day|month|year|df|mf}}{{#ifeq: {{NAMESPACENUMBER}} | 0 | {{#if: {{#invoke:wd|label|raw}} | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}} | {{#if: {{#invoke:wd|properties|raw|P569}} | | [[Category:Date of birth not in Wikidata]] }} }} | [[Category:Articles without Wikidata item]] }} }}</includeonly><noinclude>{{documentation}}</noinclude> 55c7a1b79d4b09cf1b1c81565ac2bd7da422612e Module:Date 828 455 924 2020-08-03T02:55:18Z Infobox-person>Johnuniq 0 update from sandbox: implement show=M (minutes) and show=s (seconds); better method to fill a partial date Scribunto text/plain -- Date functions for use by other modules. -- I18N and time zones are not supported. local MINUS = '−' -- Unicode U+2212 MINUS SIGN local floor = math.floor local Date, DateDiff, diffmt -- forward declarations local uniq = { 'unique identifier' } local function is_date(t) -- The system used to make a date read-only means there is no unique -- metatable that is conveniently accessible to check. return type(t) == 'table' and t._id == uniq end local function is_diff(t) return type(t) == 'table' and getmetatable(t) == diffmt end local function _list_join(list, sep) return table.concat(list, sep) end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, join = _list_join, } end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when Date fields are provided from -- another module which may pass a string, a number, or another type). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function is_leap_year(year, calname) -- Return true if year is a leap year. if calname == 'Julian' then return year % 4 == 0 end return (year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0 end local function days_in_month(year, month, calname) -- Return number of days (1..31) in given month (1..12). if month == 2 and is_leap_year(year, calname) then return 29 end return ({ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 })[month] end local function h_m_s(time) -- Return hour, minute, second extracted from fraction of a day. time = floor(time * 24 * 3600 + 0.5) -- number of seconds local second = time % 60 time = floor(time / 60) return floor(time / 60), time % 60, second end local function hms(date) -- Return fraction of a day from date's time, where (0 <= fraction < 1) -- if the values are valid, but could be anything if outside range. return (date.hour + (date.minute + date.second / 60) / 60) / 24 end local function julian_date(date) -- Return jd, jdz from a Julian or Gregorian calendar date where -- jd = Julian date and its fractional part is zero at noon -- jdz = same, but assume time is 00:00:00 if no time given -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- Testing shows this works for all dates from year -9999 to 9999! -- JDN 0 is the 24-hour period starting at noon UTC on Monday -- 1 January 4713 BC = (-4712, 1, 1) Julian calendar -- 24 November 4714 BC = (-4713, 11, 24) Gregorian calendar local offset local a = floor((14 - date.month)/12) local y = date.year + 4800 - a if date.calendar == 'Julian' then offset = floor(y/4) - 32083 else offset = floor(y/4) - floor(y/100) + floor(y/400) - 32045 end local m = date.month + 12*a - 3 local jd = date.day + floor((153*m + 2)/5) + 365*y + offset if date.hastime then jd = jd + hms(date) - 0.5 return jd, jd end return jd, jd - 0.5 end local function set_date_from_jd(date) -- Set the fields of table date from its Julian date field. -- Return true if date is valid. -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- This handles the proleptic Julian and Gregorian calendars. -- Negative Julian dates are not defined but they work. local calname = date.calendar local low, high -- min/max limits for date ranges −9999-01-01 to 9999-12-31 if calname == 'Gregorian' then low, high = -1930999.5, 5373484.49999 elseif calname == 'Julian' then low, high = -1931076.5, 5373557.49999 else return end local jd = date.jd if not (type(jd) == 'number' and low <= jd and jd <= high) then return end local jdn = floor(jd) if date.hastime then local time = jd - jdn -- 0 <= time < 1 if time >= 0.5 then -- if at or after midnight of next day jdn = jdn + 1 time = time - 0.5 else time = time + 0.5 end date.hour, date.minute, date.second = h_m_s(time) else date.second = 0 date.minute = 0 date.hour = 0 end local b, c if calname == 'Julian' then b = 0 c = jdn + 32082 else -- Gregorian local a = jdn + 32044 b = floor((4*a + 3)/146097) c = a - floor(146097*b/4) end local d = floor((4*c + 3)/1461) local e = c - floor(1461*d/4) local m = floor((5*e + 2)/153) date.day = e - floor((153*m + 2)/5) + 1 date.month = m + 3 - 12*floor(m/10) date.year = 100*b + d - 4800 + floor(m/10) return true end local function fix_numbers(numbers, y, m, d, H, M, S, partial, hastime, calendar) -- Put the result of normalizing the given values in table numbers. -- The result will have valid m, d values if y is valid; caller checks y. -- The logic of PHP mktime is followed where m or d can be zero to mean -- the previous unit, and -1 is the one before that, etc. -- Positive values carry forward. local date if not (1 <= m and m <= 12) then date = Date(y, 1, 1) if not date then return end date = date + ((m - 1) .. 'm') y, m = date.year, date.month end local days_hms if not partial then if hastime and H and M and S then if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then days_hms = hms({ hour = H, minute = M, second = S }) end end if days_hms or not (1 <= d and d <= days_in_month(y, m, calendar)) then date = date or Date(y, m, 1) if not date then return end date = date + (d - 1 + (days_hms or 0)) y, m, d = date.year, date.month, date.day if days_hms then H, M, S = date.hour, date.minute, date.second end end end numbers.year = y numbers.month = m numbers.day = d if days_hms then -- Don't set H unless it was valid because a valid H will set hastime. numbers.hour = H numbers.minute = M numbers.second = S end end local function set_date_from_numbers(date, numbers, options) -- Set the fields of table date from numeric values. -- Return true if date is valid. if type(numbers) ~= 'table' then return end local y = numbers.year or date.year local m = numbers.month or date.month local d = numbers.day or date.day local H = numbers.hour local M = numbers.minute or date.minute or 0 local S = numbers.second or date.second or 0 local need_fix if y and m and d then date.partial = nil if not (-9999 <= y and y <= 9999 and 1 <= m and m <= 12 and 1 <= d and d <= days_in_month(y, m, date.calendar)) then if not date.want_fix then return end need_fix = true end elseif y and date.partial then if d or not (-9999 <= y and y <= 9999) then return end if m and not (1 <= m and m <= 12) then if not date.want_fix then return end need_fix = true end else return end if date.partial then H = nil -- ignore any time M = nil S = nil else if H then -- It is not possible to set M or S without also setting H. date.hastime = true else H = 0 end if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then if date.want_fix then need_fix = true else return end end end date.want_fix = nil if need_fix then fix_numbers(numbers, y, m, d, H, M, S, date.partial, date.hastime, date.calendar) return set_date_from_numbers(date, numbers, options) end date.year = y -- -9999 to 9999 ('n BC' → year = 1 - n) date.month = m -- 1 to 12 (may be nil if partial) date.day = d -- 1 to 31 (* = nil if partial) date.hour = H -- 0 to 59 (*) date.minute = M -- 0 to 59 (*) date.second = S -- 0 to 59 (*) if type(options) == 'table' then for _, k in ipairs({ 'am', 'era', 'format' }) do if options[k] then date.options[k] = options[k] end end end return true end local function make_option_table(options1, options2) -- If options1 is a string, return a table with its settings, or -- if it is a table, use its settings. -- Missing options are set from table options2 or defaults. -- If a default is used, a flag is set so caller knows the value was not intentionally set. -- Valid option settings are: -- am: 'am', 'a.m.', 'AM', 'A.M.' -- 'pm', 'p.m.', 'PM', 'P.M.' (each has same meaning as corresponding item above) -- era: 'BCMINUS', 'BCNEGATIVE', 'BC', 'B.C.', 'BCE', 'B.C.E.', 'AD', 'A.D.', 'CE', 'C.E.' -- Option am = 'am' does not mean the hour is AM; it means 'am' or 'pm' is used, depending on the hour, -- and am = 'pm' has the same meaning. -- Similarly, era = 'BC' means 'BC' is used if year <= 0. -- BCMINUS displays a MINUS if year < 0 and the display format does not include %{era}. -- BCNEGATIVE is similar but displays a hyphen. local result = { bydefault = {} } if type(options1) == 'table' then result.am = options1.am result.era = options1.era elseif type(options1) == 'string' then -- Example: 'am:AM era:BC' or 'am=AM era=BC'. for item in options1:gmatch('%S+') do local lhs, rhs = item:match('^(%w+)[:=](.+)$') if lhs then result[lhs] = rhs end end end options2 = type(options2) == 'table' and options2 or {} local defaults = { am = 'am', era = 'BC' } for k, v in pairs(defaults) do if not result[k] then if options2[k] then result[k] = options2[k] else result[k] = v result.bydefault[k] = true end end end return result end local ampm_options = { -- lhs = input text accepted as an am/pm option -- rhs = code used internally ['am'] = 'am', ['AM'] = 'AM', ['a.m.'] = 'a.m.', ['A.M.'] = 'A.M.', ['pm'] = 'am', -- same as am ['PM'] = 'AM', ['p.m.'] = 'a.m.', ['P.M.'] = 'A.M.', } local era_text = { -- Text for displaying an era with a positive year (after adjusting -- by replacing year with 1 - year if date.year <= 0). -- options.era = { year<=0 , year>0 } ['BCMINUS'] = { 'BC' , '' , isbc = true, sign = MINUS }, ['BCNEGATIVE'] = { 'BC' , '' , isbc = true, sign = '-' }, ['BC'] = { 'BC' , '' , isbc = true }, ['B.C.'] = { 'B.C.' , '' , isbc = true }, ['BCE'] = { 'BCE' , '' , isbc = true }, ['B.C.E.'] = { 'B.C.E.', '' , isbc = true }, ['AD'] = { 'BC' , 'AD' }, ['A.D.'] = { 'B.C.' , 'A.D.' }, ['CE'] = { 'BCE' , 'CE' }, ['C.E.'] = { 'B.C.E.', 'C.E.' }, } local function get_era_for_year(era, year) return (era_text[era] or era_text['BC'])[year > 0 and 2 or 1] or '' end local function strftime(date, format, options) -- Return date formatted as a string using codes similar to those -- in the C strftime library function. local sformat = string.format local shortcuts = { ['%c'] = '%-I:%M %p %-d %B %-Y %{era}', -- date and time: 2:30 pm 1 April 2016 ['%x'] = '%-d %B %-Y %{era}', -- date: 1 April 2016 ['%X'] = '%-I:%M %p', -- time: 2:30 pm } if shortcuts[format] then format = shortcuts[format] end local codes = { a = { field = 'dayabbr' }, A = { field = 'dayname' }, b = { field = 'monthabbr' }, B = { field = 'monthname' }, u = { fmt = '%d' , field = 'dowiso' }, w = { fmt = '%d' , field = 'dow' }, d = { fmt = '%02d', fmt2 = '%d', field = 'day' }, m = { fmt = '%02d', fmt2 = '%d', field = 'month' }, Y = { fmt = '%04d', fmt2 = '%d', field = 'year' }, H = { fmt = '%02d', fmt2 = '%d', field = 'hour' }, M = { fmt = '%02d', fmt2 = '%d', field = 'minute' }, S = { fmt = '%02d', fmt2 = '%d', field = 'second' }, j = { fmt = '%03d', fmt2 = '%d', field = 'dayofyear' }, I = { fmt = '%02d', fmt2 = '%d', field = 'hour', special = 'hour12' }, p = { field = 'hour', special = 'am' }, } options = make_option_table(options, date.options) local amopt = options.am local eraopt = options.era local function replace_code(spaces, modifier, id) local code = codes[id] if code then local fmt = code.fmt if modifier == '-' and code.fmt2 then fmt = code.fmt2 end local value = date[code.field] if not value then return nil -- an undefined field in a partial date end local special = code.special if special then if special == 'hour12' then value = value % 12 value = value == 0 and 12 or value elseif special == 'am' then local ap = ({ ['a.m.'] = { 'a.m.', 'p.m.' }, ['AM'] = { 'AM', 'PM' }, ['A.M.'] = { 'A.M.', 'P.M.' }, })[ampm_options[amopt]] or { 'am', 'pm' } return (spaces == '' and '' or '&nbsp;') .. (value < 12 and ap[1] or ap[2]) end end if code.field == 'year' then local sign = (era_text[eraopt] or {}).sign if not sign or format:find('%{era}', 1, true) then sign = '' if value <= 0 then value = 1 - value end else if value >= 0 then sign = '' else value = -value end end return spaces .. sign .. sformat(fmt, value) end return spaces .. (fmt and sformat(fmt, value) or value) end end local function replace_property(spaces, id) if id == 'era' then -- Special case so can use local era option. local result = get_era_for_year(eraopt, date.year) if result == '' then return '' end return (spaces == '' and '' or '&nbsp;') .. result end local result = date[id] if type(result) == 'string' then return spaces .. result end if type(result) == 'number' then return spaces .. tostring(result) end if type(result) == 'boolean' then return spaces .. (result and '1' or '0') end -- This occurs if id is an undefined field in a partial date, or is the name of a function. return nil end local PERCENT = '\127PERCENT\127' return (format :gsub('%%%%', PERCENT) :gsub('(%s*)%%{(%w+)}', replace_property) :gsub('(%s*)%%(%-?)(%a)', replace_code) :gsub(PERCENT, '%%') ) end local function _date_text(date, fmt, options) -- Return a formatted string representing the given date. if not is_date(date) then error('date:text: need a date (use "date:text()" with a colon)', 2) end if type(fmt) == 'string' and fmt:match('%S') then if fmt:find('%', 1, true) then return strftime(date, fmt, options) end elseif date.partial then fmt = date.month and 'my' or 'y' else fmt = 'dmy' if date.hastime then fmt = (date.second > 0 and 'hms ' or 'hm ') .. fmt end end local function bad_format() -- For consistency with other format processing, return given format -- (or cleaned format if original was not a string) if invalid. return mw.text.nowiki(fmt) end if date.partial then -- Ignore days in standard formats like 'ymd'. if fmt == 'ym' or fmt == 'ymd' then fmt = date.month and '%Y-%m %{era}' or '%Y %{era}' elseif fmt == 'my' or fmt == 'dmy' or fmt == 'mdy' then fmt = date.month and '%B %-Y %{era}' or '%-Y %{era}' elseif fmt == 'y' then fmt = date.month and '%-Y %{era}' or '%-Y %{era}' else return bad_format() end return strftime(date, fmt, options) end local function hm_fmt() local plain = make_option_table(options, date.options).bydefault.am return plain and '%H:%M' or '%-I:%M %p' end local need_time = date.hastime local t = collection() for item in fmt:gmatch('%S+') do local f if item == 'hm' then f = hm_fmt() need_time = false elseif item == 'hms' then f = '%H:%M:%S' need_time = false elseif item == 'ymd' then f = '%Y-%m-%d %{era}' elseif item == 'mdy' then f = '%B %-d, %-Y %{era}' elseif item == 'dmy' then f = '%-d %B %-Y %{era}' else return bad_format() end t:add(f) end fmt = t:join(' ') if need_time then fmt = hm_fmt() .. ' ' .. fmt end return strftime(date, fmt, options) end local day_info = { -- 0=Sun to 6=Sat [0] = { 'Sun', 'Sunday' }, { 'Mon', 'Monday' }, { 'Tue', 'Tuesday' }, { 'Wed', 'Wednesday' }, { 'Thu', 'Thursday' }, { 'Fri', 'Friday' }, { 'Sat', 'Saturday' }, } local month_info = { -- 1=Jan to 12=Dec { 'Jan', 'January' }, { 'Feb', 'February' }, { 'Mar', 'March' }, { 'Apr', 'April' }, { 'May', 'May' }, { 'Jun', 'June' }, { 'Jul', 'July' }, { 'Aug', 'August' }, { 'Sep', 'September' }, { 'Oct', 'October' }, { 'Nov', 'November' }, { 'Dec', 'December' }, } local function name_to_number(text, translate) if type(text) == 'string' then return translate[text:lower()] end end local function day_number(text) return name_to_number(text, { sun = 0, sunday = 0, mon = 1, monday = 1, tue = 2, tuesday = 2, wed = 3, wednesday = 3, thu = 4, thursday = 4, fri = 5, friday = 5, sat = 6, saturday = 6, }) end local function month_number(text) return name_to_number(text, { jan = 1, january = 1, feb = 2, february = 2, mar = 3, march = 3, apr = 4, april = 4, may = 5, jun = 6, june = 6, jul = 7, july = 7, aug = 8, august = 8, sep = 9, september = 9, sept = 9, oct = 10, october = 10, nov = 11, november = 11, dec = 12, december = 12, }) end local function _list_text(list, fmt) -- Return a list of formatted strings from a list of dates. if not type(list) == 'table' then error('date:list:text: need "list:text()" with a colon', 2) end local result = { join = _list_join } for i, date in ipairs(list) do result[i] = date:text(fmt) end return result end local function _date_list(date, spec) -- Return a possibly empty numbered table of dates meeting the specification. -- Dates in the list are in ascending order (oldest date first). -- The spec should be a string of form "<count> <day> <op>" -- where each item is optional and -- count = number of items wanted in list -- day = abbreviation or name such as Mon or Monday -- op = >, >=, <, <= (default is > meaning after date) -- If no count is given, the list is for the specified days in date's month. -- The default day is date's day. -- The spec can also be a positive or negative number: -- -5 is equivalent to '5 <' -- 5 is equivalent to '5' which is '5 >' if not is_date(date) then error('date:list: need a date (use "date:list()" with a colon)', 2) end local list = { text = _list_text } if date.partial then return list end local count, offset, operation local ops = { ['>='] = { before = false, include = true }, ['>'] = { before = false, include = false }, ['<='] = { before = true , include = true }, ['<'] = { before = true , include = false }, } if spec then if type(spec) == 'number' then count = floor(spec + 0.5) if count < 0 then count = -count operation = ops['<'] end elseif type(spec) == 'string' then local num, day, op = spec:match('^%s*(%d*)%s*(%a*)%s*([<>=]*)%s*$') if not num then return list end if num ~= '' then count = tonumber(num) end if day ~= '' then local dow = day_number(day:gsub('[sS]$', '')) -- accept plural days if not dow then return list end offset = dow - date.dow end operation = ops[op] else return list end end offset = offset or 0 operation = operation or ops['>'] local datefrom, dayfirst, daylast if operation.before then if offset > 0 or (offset == 0 and not operation.include) then offset = offset - 7 end if count then if count > 1 then offset = offset - 7*(count - 1) end datefrom = date + offset else daylast = date.day + offset dayfirst = daylast % 7 if dayfirst == 0 then dayfirst = 7 end end else if offset < 0 or (offset == 0 and not operation.include) then offset = offset + 7 end if count then datefrom = date + offset else dayfirst = date.day + offset daylast = date.monthdays end end if not count then if daylast < dayfirst then return list end count = floor((daylast - dayfirst)/7) + 1 datefrom = Date(date, {day = dayfirst}) end for i = 1, count do if not datefrom then break end -- exceeds date limits list[i] = datefrom datefrom = datefrom + 7 end return list end -- A table to get the current date/time (UTC), but only if needed. local current = setmetatable({}, { __index = function (self, key) local d = os.date('!*t') self.year = d.year self.month = d.month self.day = d.day self.hour = d.hour self.minute = d.min self.second = d.sec return rawget(self, key) end }) local function extract_date(newdate, text) -- Parse the date/time in text and return n, o where -- n = table of numbers with date/time fields -- o = table of options for AM/PM or AD/BC or format, if any -- or return nothing if date is known to be invalid. -- Caller determines if the values in n are valid. -- A year must be positive ('1' to '9999'); use 'BC' for BC. -- In a y-m-d string, the year must be four digits to avoid ambiguity -- ('0001' to '9999'). The only way to enter year <= 0 is by specifying -- the date as three numeric parameters like ymd Date(-1, 1, 1). -- Dates of form d/m/y, m/d/y, y/m/d are rejected as potentially ambiguous. local date, options = {}, {} if text:sub(-1) == 'Z' then -- Extract date/time from a Wikidata timestamp. -- The year can be 1 to 16 digits but this module handles 1 to 4 digits only. -- Examples: '+2016-06-21T14:30:00Z', '-0000000180-00-00T00:00:00Z'. local sign, y, m, d, H, M, S = text:match('^([+%-])(%d+)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)Z$') if sign then y = tonumber(y) if sign == '-' and y > 0 then y = -y end if y <= 0 then options.era = 'BCE' end date.year = y m = tonumber(m) d = tonumber(d) H = tonumber(H) M = tonumber(M) S = tonumber(S) if m == 0 then newdate.partial = true return date, options end date.month = m if d == 0 then newdate.partial = true return date, options end date.day = d if H > 0 or M > 0 or S > 0 then date.hour = H date.minute = M date.second = S end return date, options end return end local function extract_ymd(item) -- Called when no day or month has been set. local y, m, d = item:match('^(%d%d%d%d)%-(%w+)%-(%d%d?)$') if y then if date.year then return end if m:match('^%d%d?$') then m = tonumber(m) else m = month_number(m) end if m then date.year = tonumber(y) date.month = m date.day = tonumber(d) return true end end end local function extract_day_or_year(item) -- Called when a day would be valid, or -- when a year would be valid if no year has been set and partial is set. local number, suffix = item:match('^(%d%d?%d?%d?)(.*)$') if number then local n = tonumber(number) if #number <= 2 and n <= 31 then suffix = suffix:lower() if suffix == '' or suffix == 'st' or suffix == 'nd' or suffix == 'rd' or suffix == 'th' then date.day = n return true end elseif suffix == '' and newdate.partial and not date.year then date.year = n return true end end end local function extract_month(item) -- A month must be given as a name or abbreviation; a number could be ambiguous. local m = month_number(item) if m then date.month = m return true end end local function extract_time(item) local h, m, s = item:match('^(%d%d?):(%d%d)(:?%d*)$') if date.hour or not h then return end if s ~= '' then s = s:match('^:(%d%d)$') if not s then return end end date.hour = tonumber(h) date.minute = tonumber(m) date.second = tonumber(s) -- nil if empty string return true end local item_count = 0 local index_time local function set_ampm(item) local H = date.hour if H and not options.am and index_time + 1 == item_count then options.am = ampm_options[item] -- caller checked this is not nil if item:match('^[Aa]') then if not (1 <= H and H <= 12) then return end if H == 12 then date.hour = 0 end else if not (1 <= H and H <= 23) then return end if H <= 11 then date.hour = H + 12 end end return true end end for item in text:gsub(',', ' '):gsub('&nbsp;', ' '):gmatch('%S+') do item_count = item_count + 1 if era_text[item] then -- Era is accepted in peculiar places. if options.era then return end options.era = item elseif ampm_options[item] then if not set_ampm(item) then return end elseif item:find(':', 1, true) then if not extract_time(item) then return end index_time = item_count elseif date.day and date.month then if date.year then return -- should be nothing more so item is invalid end if not item:match('^(%d%d?%d?%d?)$') then return end date.year = tonumber(item) elseif date.day then if not extract_month(item) then return end elseif date.month then if not extract_day_or_year(item) then return end elseif extract_month(item) then options.format = 'mdy' elseif extract_ymd(item) then options.format = 'ymd' elseif extract_day_or_year(item) then if date.day then options.format = 'dmy' end else return end end if not date.year or date.year == 0 then return end local era = era_text[options.era] if era and era.isbc then date.year = 1 - date.year end return date, options end local function autofill(date1, date2) -- Fill any missing month or day in each date using the -- corresponding component from the other date, if present, -- or with 1 if both dates are missing the month or day. -- This gives a good result for calculating the difference -- between two partial dates when no range is wanted. -- Return filled date1, date2 (two full dates). local function filled(a, b) -- Return date a filled, if necessary, with month and/or day from date b. -- The filled day is truncated to fit the number of days in the month. local fillmonth, fillday if not a.month then fillmonth = b.month or 1 end if not a.day then fillday = b.day or 1 end if fillmonth or fillday then -- need to create a new date a = Date(a, { month = fillmonth, day = math.min(fillday or a.day, days_in_month(a.year, fillmonth or a.month, a.calendar)) }) end return a end return filled(date1, date2), filled(date2, date1) end local function date_add_sub(lhs, rhs, is_sub) -- Return a new date from calculating (lhs + rhs) or (lhs - rhs), -- or return nothing if invalid. -- The result is nil if the calculated date exceeds allowable limits. -- Caller ensures that lhs is a date; its properties are copied for the new date. if lhs.partial then -- Adding to a partial is not supported. -- Can subtract a date or partial from a partial, but this is not called for that. return end local function is_prefix(text, word, minlen) local n = #text return (minlen or 1) <= n and n <= #word and text == word:sub(1, n) end local function do_days(n) local forcetime, jd if floor(n) == n then jd = lhs.jd else forcetime = not lhs.hastime jd = lhs.jdz end jd = jd + (is_sub and -n or n) if forcetime then jd = tostring(jd) if not jd:find('.', 1, true) then jd = jd .. '.0' end end return Date(lhs, 'juliandate', jd) end if type(rhs) == 'number' then -- Add/subtract days, including fractional days. return do_days(rhs) end if type(rhs) == 'string' then -- rhs is a single component like '26m' or '26 months' (with optional sign). -- Fractions like '3.25d' are accepted for the units which are handled as days. local sign, numstr, id = rhs:match('^%s*([+-]?)([%d%.]+)%s*(%a+)$') if sign then if sign == '-' then is_sub = not (is_sub and true or false) end local y, m, days local num = tonumber(numstr) if not num then return end id = id:lower() if is_prefix(id, 'years') then y = num m = 0 elseif is_prefix(id, 'months') then y = floor(num / 12) m = num % 12 elseif is_prefix(id, 'weeks') then days = num * 7 elseif is_prefix(id, 'days') then days = num elseif is_prefix(id, 'hours') then days = num / 24 elseif is_prefix(id, 'minutes', 3) then days = num / (24 * 60) elseif is_prefix(id, 'seconds') then days = num / (24 * 3600) else return end if days then return do_days(days) end if numstr:find('.', 1, true) then return end if is_sub then y = -y m = -m end assert(-11 <= m and m <= 11) y = lhs.year + y m = lhs.month + m if m > 12 then y = y + 1 m = m - 12 elseif m < 1 then y = y - 1 m = m + 12 end local d = math.min(lhs.day, days_in_month(y, m, lhs.calendar)) return Date(lhs, y, m, d) end end if is_diff(rhs) then local days = rhs.age_days if (is_sub or false) ~= (rhs.isnegative or false) then days = -days end return lhs + days end end local full_date_only = { dayabbr = true, dayname = true, dow = true, dayofweek = true, dowiso = true, dayofweekiso = true, dayofyear = true, gsd = true, juliandate = true, jd = true, jdz = true, jdnoon = true, } -- Metatable for a date's calculated fields. local datemt = { __index = function (self, key) if rawget(self, 'partial') then if full_date_only[key] then return end if key == 'monthabbr' or key == 'monthdays' or key == 'monthname' then if not self.month then return end end end local value if key == 'dayabbr' then value = day_info[self.dow][1] elseif key == 'dayname' then value = day_info[self.dow][2] elseif key == 'dow' then value = (self.jdnoon + 1) % 7 -- day-of-week 0=Sun to 6=Sat elseif key == 'dayofweek' then value = self.dow elseif key == 'dowiso' then value = (self.jdnoon % 7) + 1 -- ISO day-of-week 1=Mon to 7=Sun elseif key == 'dayofweekiso' then value = self.dowiso elseif key == 'dayofyear' then local first = Date(self.year, 1, 1, self.calendar).jdnoon value = self.jdnoon - first + 1 -- day-of-year 1 to 366 elseif key == 'era' then -- Era text (never a negative sign) from year and options. value = get_era_for_year(self.options.era, self.year) elseif key == 'format' then value = self.options.format or 'dmy' elseif key == 'gsd' then -- GSD = 1 from 00:00:00 to 23:59:59 on 1 January 1 AD Gregorian calendar, -- which is from jd 1721425.5 to 1721426.49999. value = floor(self.jd - 1721424.5) elseif key == 'juliandate' or key == 'jd' or key == 'jdz' then local jd, jdz = julian_date(self) rawset(self, 'juliandate', jd) rawset(self, 'jd', jd) rawset(self, 'jdz', jdz) return key == 'jdz' and jdz or jd elseif key == 'jdnoon' then -- Julian date at noon (an integer) on the calendar day when jd occurs. value = floor(self.jd + 0.5) elseif key == 'isleapyear' then value = is_leap_year(self.year, self.calendar) elseif key == 'monthabbr' then value = month_info[self.month][1] elseif key == 'monthdays' then value = days_in_month(self.year, self.month, self.calendar) elseif key == 'monthname' then value = month_info[self.month][2] end if value ~= nil then rawset(self, key, value) return value end end, } -- Date operators. local function mt_date_add(lhs, rhs) if not is_date(lhs) then lhs, rhs = rhs, lhs -- put date on left (it must be a date for this to have been called) end return date_add_sub(lhs, rhs) end local function mt_date_sub(lhs, rhs) if is_date(lhs) then if is_date(rhs) then return DateDiff(lhs, rhs) end return date_add_sub(lhs, rhs, true) end end local function mt_date_concat(lhs, rhs) return tostring(lhs) .. tostring(rhs) end local function mt_date_tostring(self) return self:text() end local function mt_date_eq(lhs, rhs) -- Return true if dates identify same date/time where, for example, -- Date(-4712, 1, 1, 'Julian') == Date(-4713, 11, 24, 'Gregorian') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. -- The months may both be nil, but must be the same. return lhs.year == rhs.year and lhs.month == rhs.month and lhs.calendar == rhs.calendar end return lhs.jdz == rhs.jdz end local function mt_date_lt(lhs, rhs) -- Return true if lhs < rhs, for example, -- Date('1 Jan 2016') < Date('06:00 1 Jan 2016') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. if lhs.calendar ~= rhs.calendar then return lhs.calendar == 'Julian' end if lhs.partial then lhs = lhs.partial.first end if rhs.partial then rhs = rhs.partial.first end end return lhs.jdz < rhs.jdz end --[[ Examples of syntax to construct a date: Date(y, m, d, 'julian') default calendar is 'gregorian' Date(y, m, d, H, M, S, 'julian') Date('juliandate', jd, 'julian') if jd contains "." text output includes H:M:S Date('currentdate') Date('currentdatetime') Date('1 April 1995', 'julian') parse date from text Date('1 April 1995 AD', 'julian') using an era sets a flag to do the same for output Date('04:30:59 1 April 1995', 'julian') Date(date) copy of an existing date Date(date, t) same, updated with y,m,d,H,M,S fields from table t Date(t) date with y,m,d,H,M,S fields from table t ]] function Date(...) -- for forward declaration above -- Return a table holding a date assuming a uniform calendar always applies -- (proleptic Gregorian calendar or proleptic Julian calendar), or -- return nothing if date is invalid. -- A partial date has a valid year, however its month may be nil, and -- its day and time fields are nil. -- Field partial is set to false (if a full date) or a table (if a partial date). local calendars = { julian = 'Julian', gregorian = 'Gregorian' } local newdate = { _id = uniq, calendar = 'Gregorian', -- default is Gregorian calendar hastime = false, -- true if input sets a time hour = 0, -- always set hour/minute/second so don't have to handle nil minute = 0, second = 0, options = {}, list = _date_list, subtract = function (self, rhs, options) return DateDiff(self, rhs, options) end, text = _date_text, } local argtype, datetext, is_copy, jd_number, tnums local numindex = 0 local numfields = { 'year', 'month', 'day', 'hour', 'minute', 'second' } local numbers = {} for _, v in ipairs({...}) do v = strip_to_nil(v) local vlower = type(v) == 'string' and v:lower() or nil if v == nil then -- Ignore empty arguments after stripping so modules can directly pass template parameters. elseif calendars[vlower] then newdate.calendar = calendars[vlower] elseif vlower == 'partial' then newdate.partial = true elseif vlower == 'fix' then newdate.want_fix = true elseif is_date(v) then -- Copy existing date (items can be overridden by other arguments). if is_copy or tnums then return end is_copy = true newdate.calendar = v.calendar newdate.partial = v.partial newdate.hastime = v.hastime newdate.options = v.options newdate.year = v.year newdate.month = v.month newdate.day = v.day newdate.hour = v.hour newdate.minute = v.minute newdate.second = v.second elseif type(v) == 'table' then if tnums then return end tnums = {} local tfields = { year=1, month=1, day=1, hour=2, minute=2, second=2 } for tk, tv in pairs(v) do if tfields[tk] then tnums[tk] = tonumber(tv) end if tfields[tk] == 2 then newdate.hastime = true end end else local num = tonumber(v) if not num and argtype == 'setdate' and numindex == 1 then num = month_number(v) end if num then if not argtype then argtype = 'setdate' end if argtype == 'setdate' and numindex < 6 then numindex = numindex + 1 numbers[numfields[numindex]] = num elseif argtype == 'juliandate' and not jd_number then jd_number = num if type(v) == 'string' then if v:find('.', 1, true) then newdate.hastime = true end elseif num ~= floor(num) then -- The given value was a number. The time will be used -- if the fractional part is nonzero. newdate.hastime = true end else return end elseif argtype then return elseif type(v) == 'string' then if v == 'currentdate' or v == 'currentdatetime' or v == 'juliandate' then argtype = v else argtype = 'datetext' datetext = v end else return end end end if argtype == 'datetext' then if tnums or not set_date_from_numbers(newdate, extract_date(newdate, datetext)) then return end elseif argtype == 'juliandate' then newdate.partial = nil newdate.jd = jd_number if not set_date_from_jd(newdate) then return end elseif argtype == 'currentdate' or argtype == 'currentdatetime' then newdate.partial = nil newdate.year = current.year newdate.month = current.month newdate.day = current.day if argtype == 'currentdatetime' then newdate.hour = current.hour newdate.minute = current.minute newdate.second = current.second newdate.hastime = true end newdate.calendar = 'Gregorian' -- ignore any given calendar name elseif argtype == 'setdate' then if tnums or not set_date_from_numbers(newdate, numbers) then return end elseif not (is_copy or tnums) then return end if tnums then newdate.jd = nil -- force recalculation in case jd was set before changes from tnums if not set_date_from_numbers(newdate, tnums) then return end end if newdate.partial then local year = newdate.year local month = newdate.month local first = Date(year, month or 1, 1, newdate.calendar) month = month or 12 local last = Date(year, month, days_in_month(year, month), newdate.calendar) newdate.partial = { first = first, last = last } else newdate.partial = false -- avoid index lookup end setmetatable(newdate, datemt) local readonly = {} local mt = { __index = newdate, __newindex = function(t, k, v) error('date.' .. tostring(k) .. ' is read-only', 2) end, __add = mt_date_add, __sub = mt_date_sub, __concat = mt_date_concat, __tostring = mt_date_tostring, __eq = mt_date_eq, __lt = mt_date_lt, } return setmetatable(readonly, mt) end local function _diff_age(diff, code, options) -- Return a tuple of integer values from diff as specified by code, except that -- each integer may be a list of two integers for a diff with a partial date, or -- return nil if the code is not supported. -- If want round, the least significant unit is rounded to nearest whole unit. -- For a duration, an extra day is added. local wantround, wantduration, wantrange if type(options) == 'table' then wantround = options.round wantduration = options.duration wantrange = options.range else wantround = options end if not is_diff(diff) then local f = wantduration and 'duration' or 'age' error(f .. ': need a date difference (use "diff:' .. f .. '()" with a colon)', 2) end if diff.partial then -- Ignore wantround, wantduration. local function choose(v) if type(v) == 'table' then if not wantrange or v[1] == v[2] then -- Example: Date('partial', 2005) - Date('partial', 2001) gives -- diff.years = { 3, 4 } to show the range of possible results. -- If do not want a range, choose the second value as more expected. return v[2] end end return v end if code == 'ym' or code == 'ymd' then if not wantrange and diff.iszero then -- This avoids an unexpected result such as -- Date('partial', 2001) - Date('partial', 2001) -- giving diff = { years = 0, months = { 0, 11 } } -- which would be reported as 0 years and 11 months. return 0, 0 end return choose(diff.partial.years), choose(diff.partial.months) end if code == 'y' then return choose(diff.partial.years) end if code == 'm' or code == 'w' or code == 'd' then return choose({ diff.partial.mindiff:age(code), diff.partial.maxdiff:age(code) }) end return nil end local extra_days = wantduration and 1 or 0 if code == 'wd' or code == 'w' or code == 'd' then local offset = wantround and 0.5 or 0 local days = diff.age_days + extra_days if code == 'wd' or code == 'd' then days = floor(days + offset) if code == 'd' then return days end return floor(days/7), days % 7 end return floor(days/7 + offset) end local H, M, S = diff.hours, diff.minutes, diff.seconds if code == 'dh' or code == 'dhm' or code == 'dhms' or code == 'h' or code == 'hm' or code == 'hms' or code == 'M' or code == 's' then local days = floor(diff.age_days + extra_days) local inc_hour if wantround then if code == 'dh' or code == 'h' then if M >= 30 then inc_hour = true end elseif code == 'dhm' or code == 'hm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'M' then if S >= 30 then M = M + 1 end else -- Nothing needed because S is an integer. end if inc_hour then H = H + 1 if H >= 24 then H = 0 days = days + 1 end end end if code == 'dh' or code == 'dhm' or code == 'dhms' then if code == 'dh' then return days, H elseif code == 'dhm' then return days, H, M else return days, H, M, S end end local hours = days * 24 + H if code == 'h' then return hours elseif code == 'hm' then return hours, M elseif code == 'M' or code == 's' then M = hours * 60 + M if code == 'M' then return M end return M * 60 + S end return hours, M, S end if wantround then local inc_hour if code == 'ymdh' or code == 'ymwdh' then if M >= 30 then inc_hour = true end elseif code == 'ymdhm' or code == 'ymwdhm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'ymd' or code == 'ymwd' or code == 'yd' or code == 'md' then if H >= 12 then extra_days = extra_days + 1 end end if inc_hour then H = H + 1 if H >= 24 then H = 0 extra_days = extra_days + 1 end end end local y, m, d = diff.years, diff.months, diff.days if extra_days > 0 then d = d + extra_days if d > 28 or code == 'yd' then -- Recalculate in case have passed a month. diff = diff.date1 + extra_days - diff.date2 y, m, d = diff.years, diff.months, diff.days end end if code == 'ymd' then return y, m, d elseif code == 'yd' then if y > 0 then -- It is known that diff.date1 > diff.date2. diff = diff.date1 - (diff.date2 + (y .. 'y')) end return y, floor(diff.age_days) elseif code == 'md' then return y * 12 + m, d elseif code == 'ym' or code == 'm' then if wantround then if d >= 16 then m = m + 1 if m >= 12 then m = 0 y = y + 1 end end end if code == 'ym' then return y, m end return y * 12 + m elseif code == 'ymw' then local weeks = floor(d/7) if wantround then local days = d % 7 if days > 3 or (days == 3 and H >= 12) then weeks = weeks + 1 end end return y, m, weeks elseif code == 'ymwd' then return y, m, floor(d/7), d % 7 elseif code == 'ymdh' then return y, m, d, H elseif code == 'ymwdh' then return y, m, floor(d/7), d % 7, H elseif code == 'ymdhm' then return y, m, d, H, M elseif code == 'ymwdhm' then return y, m, floor(d/7), d % 7, H, M end if code == 'y' then if wantround and m >= 6 then y = y + 1 end return y end return nil end local function _diff_duration(diff, code, options) if type(options) ~= 'table' then options = { round = options } end options.duration = true return _diff_age(diff, code, options) end -- Metatable for some operations on date differences. diffmt = { -- for forward declaration above __concat = function (lhs, rhs) return tostring(lhs) .. tostring(rhs) end, __tostring = function (self) return tostring(self.age_days) end, __index = function (self, key) local value if key == 'age_days' then if rawget(self, 'partial') then local function jdz(date) return (date.partial and date.partial.first or date).jdz end value = jdz(self.date1) - jdz(self.date2) else value = self.date1.jdz - self.date2.jdz end end if value ~= nil then rawset(self, key, value) return value end end, } function DateDiff(date1, date2, options) -- for forward declaration above -- Return a table with the difference between two dates (date1 - date2). -- The difference is negative if date1 is older than date2. -- Return nothing if invalid. -- If d = date1 - date2 then -- date1 = date2 + d -- If date1 >= date2 and the dates have no H:M:S time specified then -- date1 = date2 + (d.years..'y') + (d.months..'m') + d.days -- where the larger time units are added first. -- The result of Date(2015,1,x) + '1m' is Date(2015,2,28) for -- x = 28, 29, 30, 31. That means, for example, -- d = Date(2015,3,3) - Date(2015,1,31) -- gives d.years, d.months, d.days = 0, 1, 3 (excluding date1). if not (is_date(date1) and is_date(date2) and date1.calendar == date2.calendar) then return end local wantfill if type(options) == 'table' then wantfill = options.fill end local isnegative = false local iszero = false if date1 < date2 then isnegative = true date1, date2 = date2, date1 elseif date1 == date2 then iszero = true end -- It is known that date1 >= date2 (period is from date2 to date1). if date1.partial or date2.partial then -- Two partial dates might have timelines: ---------------------A=================B--- date1 is from A to B inclusive --------C=======D-------------------------- date2 is from C to D inclusive -- date1 > date2 iff A > C (date1.partial.first > date2.partial.first) -- The periods can overlap ('April 2001' - '2001'): -------------A===B------------------------- A=2001-04-01 B=2001-04-30 --------C=====================D------------ C=2001-01-01 D=2001-12-31 if wantfill then date1, date2 = autofill(date1, date2) else local function zdiff(date1, date2) local diff = date1 - date2 if diff.isnegative then return date1 - date1 -- a valid diff in case we call its methods end return diff end local function getdate(date, which) return date.partial and date.partial[which] or date end local maxdiff = zdiff(getdate(date1, 'last'), getdate(date2, 'first')) local mindiff = zdiff(getdate(date1, 'first'), getdate(date2, 'last')) local years, months if maxdiff.years == mindiff.years then years = maxdiff.years if maxdiff.months == mindiff.months then months = maxdiff.months else months = { mindiff.months, maxdiff.months } end else years = { mindiff.years, maxdiff.years } end return setmetatable({ date1 = date1, date2 = date2, partial = { years = years, months = months, maxdiff = maxdiff, mindiff = mindiff, }, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end end local y1, m1 = date1.year, date1.month local y2, m2 = date2.year, date2.month local years = y1 - y2 local months = m1 - m2 local d1 = date1.day + hms(date1) local d2 = date2.day + hms(date2) local days, time if d1 >= d2 then days = d1 - d2 else months = months - 1 -- Get days in previous month (before the "to" date) given December has 31 days. local dpm = m1 > 1 and days_in_month(y1, m1 - 1, date1.calendar) or 31 if d2 >= dpm then days = d1 - hms(date2) else days = dpm - d2 + d1 end end if months < 0 then years = years - 1 months = months + 12 end days, time = math.modf(days) local H, M, S = h_m_s(time) return setmetatable({ date1 = date1, date2 = date2, partial = false, -- avoid index lookup years = years, months = months, days = days, hours = H, minutes = M, seconds = S, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end return { _current = current, _Date = Date, _days_in_month = days_in_month, } 48b9402c32798b1e9f91f2ab44283ebda7b53ed9 Template:Code 10 476 966 2020-08-09T22:30:02Z Infobox-person>Bsherr 0 adding comment wikitext text/x-wiki {{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|id={{{id|}}}|style={{{style|}}}|inline=1}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 5d9b1a0980efe1b02eb91bc717438a5ae4a5ee04 Template:Em 10 477 968 2020-08-09T23:17:35Z Infobox-person>Bsherr 0 /* top */as found, replacing [[Template:Tld]] with [[Template:Tlc]] or adding/updating category placement comments, plus general and typo fixes wikitext text/x-wiki <em {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</em><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> e2fac6fb507a0dd72c4e79d02403049c7d857c8d Template:Yesno 10 408 824 2020-08-28T03:15:17Z Infobox-person>Xaosflux 0 add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Yesno 0 582 1188 2020-08-28T03:15:17Z History of science and technology on the Indian subcontinent>Xaosflux 0 add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Template:Cslist/styles.css 10 523 1066 2020-09-18T15:41:55Z Infobox-person>Izno 0 add embedded option text text/plain /* {{pp-template}} */ /* make an inline list with either comma or semicolon separators */ ul.cslist, ul.sslist { margin: 0; padding: 0; display: inline-block; list-style: none; } ul.cslist-embedded { display: inline; } .cslist li, .sslist li { margin: 0; padding: 0 0.25em 0 0; display: inline-block; } .cslist li:after { content: ", "; } .sslist li:after { content: "; "; } .cslist li:last-child:after, .sslist li:last-child:after { content: none; } b7fc7c7a6f4e14d23d0a7483f5727aec838c7a21 Module:Cslist 828 524 1068 2020-09-18T15:45:25Z Infobox-person>Izno 0 sync from sandbox Scribunto text/plain p = {} p.makelist = function(frame) local args = frame.args if not args[1] then args = frame:getParent().args if not args[1] then return end end local semi = (args.semi or ""):sub(1,1):lower() semi = (semi == "t") or (semi == "y") local embedded = (args.embedded or ""):sub(1,1):lower() embedded = (embedded == "y") local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local listclass = "" if semi then listclass = listclass .. "sslist" else listclass = listclass .. "cslist" end if embedded then listclass = listclass .. " cslist-embedded" end if out ~= "" then return '<ul class="'.. listclass ..'">' .. out .. '</ul>' end end return p 82fa872fef0f065ea5b7e6639e4390c93142fac9 Module:Anchor 828 470 954 2020-09-24T22:32:51Z Infobox-person>Pppery 0 Add class per edit request Scribunto text/plain -- This module implements {{anchor}}. local getArgs = require('Module:Arguments').getArgs local tableTools = require('Module:TableTools') local p = {} function p.main(frame) -- Get the positional arguments from #invoke, remove any nil values, -- and pass them to p._main. local args = getArgs(frame) local argArray = tableTools.compressSparseArray(args) return p._main(unpack(argArray)) end function p._main(...) -- Generate the list of anchors. local anchors = {...} local ret = {} for _, anchor in ipairs(anchors) do ret[#ret + 1] = '<span class="anchor" id="' .. anchor .. '"></span>' end return table.concat(ret) end return p e41d3f5d2f2840528aebb9bac719873540fcb3b8 Template:Lang 10 440 894 2020-10-19T17:49:42Z Infobox-person>Gonnym 0 wikitext text/x-wiki <includeonly>{{#invoke:Lang|{{{fn|lang}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> ed35aafbfe8198c5ad80fd861124244d0c7f2742 Module:For 828 490 994 2020-11-02T22:29:56Z Infobox-person>Andrybak 0 don't add talk pages and pages in the user namespace to [[:Category:Hatnote templates with errors]] – this is similar to [[Special:Diff/953627233/986768317|Module:Other uses of]] and [[Special:Diff/967664662|Module:Hatnote]] Scribunto text/plain local mArguments --initialize lazily local mHatlist = require('Module:Hatnote list') local mHatnote = require('Module:Hatnote') local yesNo = require('Module:Yesno') local p = {} --Implements {{For}} from the frame --uses capitalized "For" to avoid collision with Lua reserved word "for" function p.For (frame) mArguments = require('Module:Arguments') return p._For(mArguments.getArgs(frame)) end --Implements {{For}} but takes a manual arguments table function p._For (args) local use = args[1] if (not use) then return mHatnote.makeWikitextError( 'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.', 'Template:For#Errors', args.category ) end local pages = {} function two (a, b) return a, b, 1 end --lets us run ipairs from 2 for k, v in two(ipairs(args)) do table.insert(pages, v) end local title = mw.title.getCurrentTitle() local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace local oddCat = skipCat and '' or '[[Category:Hatnote templates using unusual parameters]]' local category = yesNo(args.category) return mHatnote._hatnote( mHatlist.forSeeTableToString({{use = use, pages = pages}}), {selfref = args.selfref} ) .. ( (use == 'other uses') and ((category == true) or (category == nil)) and oddCat or '' ) end return p 2faf1bd8c657f3425af829cbde9733a936d8d4f4 Template:Tnull 10 529 1078 2020-11-20T18:16:50Z Infobox-person>Primefac 0 Primefac moved page [[Template:Tnull]] to [[Template:Template link null]]: more obvious template name to match family wikitext text/x-wiki #REDIRECT [[Template:Template link null]] {{Redirect category shell| {{R from move}} }} b22d666a4b16808dc3becc2403546fb9ab5dea7e Template:Tlx 10 423 860 2020-11-20T18:53:35Z Infobox-person>Primefac 0 Primefac moved page [[Template:Tlx]] to [[Template:Template link expanded]] over redirect: expand name, make it more obvious wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link with parameters 10 532 1084 2020-11-21T12:04:32Z Infobox-person>Primefac 0 wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlp}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 8fe73a6eea633360a927820d10469b7292bfc1c2 Template:Template link expanded 10 424 862 2020-11-21T12:04:41Z Infobox-person>Primefac 0 update wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Template:Template link null 10 530 1080 2020-11-21T12:06:41Z Infobox-person>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tnull}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 2167c503e001d24d870ef82a9de0aaa9832404cb Template:Block indent/styles.css 10 427 868 2020-12-27T21:05:41Z Infobox-person>Izno 0 pp text text/plain /* {{pp|small=yes}} */ .block-indent { padding-left: 3em; padding-right: 0; overflow: hidden; } c89721fb334bfbd775783b44641a3466b6748d6b Template:Block indent 10 426 866 2020-12-27T21:23:56Z Infobox-person>Izno 0 templatestyles for block indent wikitext text/x-wiki <templatestyles src="Block indent/styles.css"/><div class="block-indent {{{class|}}}" {{#if:{{{left|}}}{{{em|}}}{{{right|}}}{{{style|}}}|style="{{#if:{{{left|{{{em|}}}}}}|padding-left: {{{left|{{{em}}}}}}em;}}{{#if:{{{right|}}}|padding-right: {{{right}}}em;}}{{#if:{{{style|}}}|{{{style}}}}}"}}>{{{1|{{{text|{{{content|{{{quote|<noinclude>{{lorem ipsum}}</noinclude><includeonly>{{error|Error: No content given to indent (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}}}}}}}}</div><noinclude> {{documentation}} </noinclude> f1e4d04c02e97bfe86521e96e8265e947e574340 Template:Xt 10 429 872 2021-01-14T19:30:02Z Infobox-person>Xaosflux 0 Changed protection level for "[[Template:Xt]]": used in system messages ([[MediaWiki:Titleblacklist-custom-archive]]) ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: #006400;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<noinclude> {{Documentation}} </noinclude> e8c5895953384f68b9648a698f7f33d79748e408 Template:Anchor 10 466 946 2021-01-31T22:06:17Z Infobox-person>Plastikspork 0 Fix |=FOO bug where {{anchor|=FOO}} transcludes [[Template:FOO]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:anchor|main}}<noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 7d65122552007ac959072bddfa6f723296c81998 Template:Tl 10 400 808 2021-02-12T22:03:00Z Infobox-person>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Template shortcut 10 554 1128 2021-02-16T17:54:32Z Infobox-person>Nardog 0 TfM closed as convert wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main|template=yes}}</includeonly><noinclude>{{Documentation}}</noinclude> bfb2889c4c0ec36294b7b667f5e03350d2df680e Module:Shortcut/config 828 535 1090 2021-02-16T18:43:45Z Infobox-person>Nardog 0 Scribunto text/plain -- This module holds configuration data for [[Module:Shortcut]]. return { -- The heading at the top of the shortcut box. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['shortcut-heading'] = '[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]', -- The heading when |redirect=yes is given. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['redirect-heading'] = '[[Wikipedia:Redirect|{{PLURAL:$1|Redirect|Redirects}}]]', -- The error message to display when a shortcut is invalid (is not a string, or -- is the blank string). It accepts the following parameter: -- $1 - the number of the shortcut in the argument list. (required) ['invalid-shortcut-error'] = 'shortcut #$1 was invalid (shortcuts must be ' .. 'strings of at least one character in length)', -- The error message to display when no shortcuts or other displayable content -- were specified. (required) ['no-content-error'] = 'Error: no shortcuts were specified and the ' .. mw.text.nowiki('|msg=') .. ' parameter was not set.', -- A category to add when the no-content-error message is displayed. (optional) ['no-content-error-category'] = 'Shortcut templates with missing parameters', } f9d1d94844d5953753eb19e30a3ce389eda3d319 Template:Reflist/styles.css 10 432 878 2021-03-08T23:00:26Z Infobox-person>Izno 0 Changed protection level for "[[Template:Reflist/styles.css]]": match parent ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) text text/plain /* {{pp|small=yes}} */ /* can we remove the font size declarations? .references gets a font-size in * common.css that is always 90, and there is nothing else in reflist out in * the wild. May affect column sizes. */ .reflist { font-size: 90%; /* Default font-size */ margin-bottom: 0.5em; list-style-type: decimal; } .reflist .references { font-size: 100%; /* Reset font-size when nested in div.reflist */ margin-bottom: 0; /* Avoid double margin when nested in div.reflist */ list-style-type: inherit; /* Enable custom list style types */ } /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Reset top margin for lists embedded in columns */ .reflist-columns { margin-top: 0.3em; } .reflist-columns ol { margin-top: 0; } /* Avoid elements breaking between columns */ .reflist-columns li { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } .reflist-upper-alpha { list-style-type: upper-alpha; } .reflist-upper-roman { list-style-type: upper-roman; } .reflist-lower-alpha { list-style-type: lower-alpha; } .reflist-lower-greek { list-style-type: lower-greek; } .reflist-lower-roman { list-style-type: lower-roman; } 531a26d48f0e7826c61f764cfb7d5fb200032c34 Reflist/styles.css 0 597 1218 2021-03-08T23:00:26Z History of science and technology on the Indian subcontinent>Izno 0 Changed protection level for "[[Template:Reflist/styles.css]]": match parent ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) text text/plain /* {{pp|small=yes}} */ /* can we remove the font size declarations? .references gets a font-size in * common.css that is always 90, and there is nothing else in reflist out in * the wild. May affect column sizes. */ .reflist { font-size: 90%; /* Default font-size */ margin-bottom: 0.5em; list-style-type: decimal; } .reflist .references { font-size: 100%; /* Reset font-size when nested in div.reflist */ margin-bottom: 0; /* Avoid double margin when nested in div.reflist */ list-style-type: inherit; /* Enable custom list style types */ } /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Reset top margin for lists embedded in columns */ .reflist-columns { margin-top: 0.3em; } .reflist-columns ol { margin-top: 0; } /* Avoid elements breaking between columns */ .reflist-columns li { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } .reflist-upper-alpha { list-style-type: upper-alpha; } .reflist-upper-roman { list-style-type: upper-roman; } .reflist-lower-alpha { list-style-type: lower-alpha; } .reflist-lower-greek { list-style-type: lower-greek; } .reflist-lower-roman { list-style-type: lower-roman; } 531a26d48f0e7826c61f764cfb7d5fb200032c34 Template:Template link 10 401 810 2021-03-25T19:03:22Z Infobox-person>Izno 0 [[Wikipedia:Templates for discussion/Log/2021 March 18#Template:Tlu]] closed as keep ([[WP:XFDC#4.0.11|XFDcloser]]) wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:!xt 10 430 874 2021-04-05T10:10:56Z Infobox-person>Xaosflux 0 Changed protection level for "[[Template:!xt]]": reduced highly visible msg use, lower to TEP ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example deprecated-content example-bad" style="font-family: Georgia, 'DejaVu Serif', serif; color: #8B0000;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<noinclude> {{Documentation}} </noinclude> 5c54359c619901a0b19422399dc9a3e324e02879 Template:Str ≥ len 10 496 1006 2021-04-06T11:38:38Z Infobox-person>Elli 0 Undid revision 1016291968 by [[Special:Contributions/Elli|Elli]] ([[User talk:Elli|talk]]) wrong template, damn it! wikitext text/x-wiki {{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} >= {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 30546d5d5d81a3efb26afb9d6cc182bdeb70eadc Module:If preview/configuration 828 438 890 2021-05-05T18:56:00Z Infobox-person>Izno 0 Protected "[[Module:If preview/configuration]]": match parent ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } 3edc8897c51a61b9e710b2a4d9eb657b3c2f1034 Module:If preview/styles.css 828 439 892 2021-05-05T18:56:47Z Infobox-person>Izno 0 pp text text/plain /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } 8b79ffc4853d424a805b084de00030e04bbd573e Module:If preview 828 437 888 2021-05-05T19:01:42Z Infobox-person>Izno 0 merge in functionality from [[Module:Preview warning]] and add TemplateStyles, remove p.boolean as not necessary, move some stuff into a cfg page, and don't return temporaries in p.main, remove use Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p 9a92196d0001b8016f2501aedfadcc3adcb974ef Module:Parameter validation/default config 828 537 1094 2021-05-06T23:30:07Z Infobox-person>Izno 0 add dependency to if preview Scribunto text/plain function create(cat, msg) return mw.ustring.format("{{main other|[[Category:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg) end function create_message(msg) return require('Module:If preview')._warning({ mw.ustring.format("[[templatename]] used with %s.", msg) }) end local options = { ["undeclared"] = create("unknown", 'unknown parameter(s): paramname'), ["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'), ["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'), ["doc-subpage"] = "doc", } local result = { [0] = options, [2] = options, [4] = options, [6] = options, [10] = options, [12] = options, [14] = options, } return result d0fc6166846893f2e0723a5fb53a574cd393a047 Module:Check for clobbered parameters 828 486 986 2021-05-07T15:16:54Z Infobox-person>Izno 0 use if preview Scribunto text/plain local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p 2d18fb6802fa261d88a0e135ab147ab9f062acde Module:Parameter validation 828 536 1092 2021-05-08T15:21:49Z Infobox-person>ProcrastinatingReader 0 doc was moved into actual doc page Scribunto text/plain local util = { empty = function( s ) return s == nil or type( s ) == 'string' and mw.text.trim( s ) == '' end , extract_options = function ( frame, optionsPrefix ) optionsPrefix = optionsPrefix or 'options' local options, n, more = {} if frame.args['module_options'] then local module_options = mw.loadData( frame.args['module_options'] ) if type( module_options ) ~= 'table' then return {} end local title = mw.title.getCurrentTitle() local local_ptions = module_options[ title.namespace ] or module_options[ title.nsText ] or {} for k, v in pairs( local_ptions ) do options[k] = v end end repeat ok, more = pcall( mw.text.jsonDecode, frame.args[optionsPrefix .. ( n or '' )] ) if ok and type( more ) == 'table' then for k, v in pairs( more ) do options[k] = v end end n = ( n or 0 ) + 1 until not ok return options end , build_namelist = function ( template_name, sp ) local res = { template_name } if sp then if type( sp ) == 'string' then sp = { sp } end for _, p in ipairs( sp ) do table.insert( res, template_name .. '/' .. p ) end end return res end , table_empty = function( t ) -- normally, test if next(t) is nil, but for some perverse reason, non-empty tables returned by loadData return nil... if type( t ) ~= 'table' then return true end for a, b in pairs( t ) do return false end return true end , } local function _readTemplateData( templateName ) local title = mw.title.makeTitle( 0, templateName ) local templateContent = title and title.exists and title:getContent() -- template's raw content local capture = templateContent and mw.ustring.match( templateContent, '<templatedata%s*>(.*)</templatedata%s*>' ) -- templatedata as text -- capture = capture and mw.ustring.gsub( capture, '"(%d+)"', tonumber ) -- convert "1": {} to 1: {}. frame.args uses numerical indexes for order-based params. local trailingComma = capture and mw.ustring.find( capture, ',%s*[%]%}]' ) -- look for ,] or ,} : jsonDecode allows it, but it's verbotten in json if capture and not trailingComma then return pcall( mw.text.jsonDecode, capture ) end return false end local function readTemplateData( templateName ) if type( templateName ) == 'string' then templateName = { templateName, templateName .. '/' .. docSubPage } end if type( templateName ) == "table" then for _, name in ipairs( templateName ) do local td, result = _readTemplateData( name ) if td then return result end end end return nil end -- this is the function to be called by other modules. it expects the frame, and then an optional list of subpages, e.g. { "Documentation" }. -- if second parameter is nil, only tempalte page will be searched for templatedata. function calculateViolations( frame, subpages ) -- used for parameter type validy test. keyed by TD 'type' string. values are function(val) returning bool. local type_validators = { ['number'] = function( s ) return mw.language.getContentLanguage():parseFormattedNumber( s ) end } function compatible( typ, val ) local func = type_validators[typ] return type( func ) ~= 'function' or util.empty( val ) or func( val ) end local t_frame = frame:getParent() local t_args, template_name = t_frame.args, t_frame:getTitle() template_name = mw.ustring.gsub( template_name, '/sandbox', '', 1 ) local td_source = util.build_namelist( template_name, subpages ) if frame.args['td_source'] then table.insert(td_source, frame.args['td_source']) end local templatedata = readTemplateData( td_source ) local td_params = templatedata and templatedata.params local all_aliases, all_series = {}, {} if not td_params then return { ['no-templatedata'] = { [''] = '' } } end -- from this point on, we know templatedata is valid. local res = {} -- before returning to caller, we'll prune empty tables -- allow for aliases for x, p in pairs( td_params ) do for y, alias in ipairs( p.aliases or {} ) do p['primary'] = x td_params[x] = p all_aliases[alias] = p if tonumber(alias) then all_aliases[tonumber(alias)] = p end end end -- handle undeclared and deprecated local already_seen = {} local series = frame.args['series'] for p_name, value in pairs( t_args ) do local tp_param, noval, numeric, table_name = td_params[p_name] or all_aliases[p_name], util.empty( value ), tonumber( p_name ) local hasval = not noval if not tp_param and series then -- 2nd chance. check to see if series for s_name, p in pairs(td_params) do if mw.ustring.match( p_name, '^' .. s_name .. '%d+' .. '$') then -- mw.log('found p_name '.. p_name .. ' s_name:' .. s_name, ' p is:', p) debugging series support tp_param = p end -- don't bother breaking. td always correct. end end if not tp_param then -- not in TD: this is called undeclared -- calculate the relevant table for this undeclared parameter, based on parameter and value types table_name = noval and numeric and 'empty-undeclared-numeric' or noval and not numeric and 'empty-undeclared' or hasval and numeric and 'undeclared-numeric' or 'undeclared' -- tzvototi nishar. else -- in td: test for deprecation and mistype. if deprecated, no further tests table_name = tp_param.deprecated and hasval and 'deprecated' or tp_param.deprecated and noval and 'empty-deprecated' or not compatible( tp_param.type, value ) and 'incompatible' or not series and already_seen[tp_param] and hasval and 'duplicate' if hasval and table_name ~= 'duplicate' then already_seen[tp_param] = p_name end end -- report it. if table_name then res[table_name] = res[table_name] or {} if table_name == 'duplicate' then local primary_param = tp_param['primary'] local primaryData = res[table_name][primary_param] if not primaryData then primaryData = {} table.insert(primaryData, already_seen[tp_param]) end table.insert(primaryData, p_name) res[table_name][primary_param] = primaryData else res[table_name][p_name] = value end end end -- check for empty/missing parameters declared "required" for p_name, param in pairs( td_params ) do if param.required and util.empty( t_args[p_name] ) then local is_alias for _, alias in ipairs( param.aliases or {} ) do is_alias = is_alias or not util.empty( t_args[alias] ) end if not is_alias then res['empty-required'] = res['empty-required'] or {} res['empty-required'][p_name] = '' end end end mw.logObject(res) return res end -- wraps report in hidden frame function wrapReport(report, template_name, options) mw.logObject(report) if util.empty( report ) then return '' end local naked = mw.title.new( template_name )['text'] naked = mw.ustring.gsub(naked, 'Infobox', 'infobox', 1) report = ( options['wrapper-prefix'] or "<div class = 'paramvalidator-wrapper'><span class='paramvalidator-error'>" ) .. report .. ( options['wrapper-suffix'] or "</span></div>" ) report = mw.ustring.gsub( report, 'tname_naked', naked ) report = mw.ustring.gsub( report, 'templatename', template_name ) return report end -- this is the "user" version, called with {{#invoke:}} returns a string, as defined by the options parameter function validateParams( frame ) local options, report, template_name = util.extract_options( frame ), '', frame:getParent():getTitle() local ignore = function( p_name ) for _, pattern in ipairs( options['ignore'] or {} ) do if mw.ustring.match( p_name, '^' .. pattern .. '$' ) then return true end end return false end local replace_macros = function( error_type, s, param_names ) function concat_and_escape( t , sep ) sep = sep or ', ' local s = table.concat( t, sep ) return ( mw.ustring.gsub( s, '%%', '%%%%' ) ) end if s and ( type( param_names ) == 'table' ) then local k_ar, kv_ar = {}, {} for k, v in pairs( param_names ) do table.insert( k_ar, k ) if type(v) == 'table' then v = table.concat(v, ', ') end if error_type == 'duplicate' then table.insert( kv_ar, v) else table.insert( kv_ar, k .. ': ' .. v) end end s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) ) s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar, ' AND ' ) ) if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) ~= "" then s = mw.ustring.gsub( s, "<div.*<%/div>", "", 1 ) end end return s end local report_params = function( key, param_names ) local res = replace_macros( key, options[key], param_names ) res = frame:preprocess(res or '') report = report .. ( res or '' ) return res end -- no option no work. if util.table_empty( options ) then return '' end -- get the errors. local violations = calculateViolations( frame, options['doc-subpage'] ) -- special request of bora: use skip_empty_numeric if violations['empty-undeclared-numeric'] then for i = 1, tonumber( options['skip-empty-numeric'] ) or 0 do violations['empty-undeclared-numeric'][i] = nil end end -- handle ignore list, and prune empty violations - in that order! local offenders = 0 for name, tab in pairs( violations ) do -- remove ignored parameters from all violations for pname in pairs( tab ) do if ignore( pname ) then tab[pname] = nil end end -- prune empty violations if util.table_empty( tab ) then violations[name] = nil end -- WORK IS DONE. report the errors. -- if report then count it. if violations[name] and report_params( name, tab ) then offenders = offenders + 1 end end if offenders > 1 then report_params( 'multiple' ) end if offenders ~= 0 then report_params( 'any' ) end -- could have tested for empty( report ), but since we count them anyway... return wrapReport(report, template_name, options) end return { ['validateparams'] = validateParams, ['calculateViolations'] = calculateViolations, ['wrapReport'] = wrapReport } 289097a36b9577156e033783df8886344de39bba Template:Visible anchor/styles.css 10 510 1034 2021-05-18T04:27:30Z Infobox-person>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ .vanchor > :target ~ .vanchor-text { background-color: #b1d2ff; } 0bc96886f41e0799b8dbfa48836892c2bb7de792 Template:Category link with count 10 550 1120 2021-06-11T18:13:44Z Infobox-person>GKFX 0 Support wider range of (valid) input format wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Navbox 10 442 898 2021-06-26T18:05:09Z Infobox-person>Trialpears 0 Remove TfD notice as it wouldn't involve any changes to this template. wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Navbox 0 602 1228 2021-06-26T18:05:09Z History of science and technology on the Indian subcontinent>Trialpears 0 Remove TfD notice as it wouldn't involve any changes to this template. wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Template:Crossreference/styles.css 10 505 1024 2021-07-12T06:50:43Z Infobox-person>SMcCandlish 0 Nope, that had no effect at all. text text/plain /* {{pp-template}} */ /* This snippet just undoes the default "padding-left: 1.6em;" imposed by div.hatnote, when Template:Crossreference is used in block (div) mode. Ignore the dumb CSS editor's "Element (div.crossreference) is overqualified" warning. It is wrong. We do not want to apply any CSS intended for block mode when it is not in block mode. While it's unlikely our "padding-left: 0;" does anything wrong in inline (span) mode, we can't guarantee it forever. */ div.crossreference { padding-left: 0; } ae665603577c5dbafbdf190ec9e29f2ed1f7cd77 Module:Hatnote/styles.css 828 451 916 2021-07-12T19:22:27Z Infobox-person>Izno 0 per my talk page text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Hatnote/styles.css 0 606 1236 2021-07-12T19:22:27Z History of science and technology on the Indian subcontinent>Izno 0 per my talk page text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Template:For 10 482 978 2021-07-17T12:58:12Z Infobox-person>Plastikspork 0 [[Wikipedia:Templates for discussion/Log/2021 July 8#Template:For]] closed as do not merge ([[WP:XFDC#4.0.12|XFDcloser]]) wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 3f70c0fa7cd736071e7c6e7dcd90ff3704df26bb Template:If both 10 409 826 2021-07-27T21:26:23Z Infobox-person>Trialpears 0 substitutable wikitext text/x-wiki {{{{{|safesubst:}}}#if:{{{1|}}}| {{{{{|safesubst:}}}#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}} |{{{4|}}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> d77fc191cada8977a8131dd6d85dde5e31d0e6f2 Template:Pval 10 553 1126 2021-08-08T07:44:26Z Infobox-person>Mathglot 0 Creating as #REDIRECT [[Template:Param value]] wikitext text/x-wiki #REDIRECT [[Template:Param value]] 068e5f0a141e534b855634c386541985fd9f0609 Template:Tooltip/styles.css 10 480 974 2021-08-15T03:04:59Z Infobox-person>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ .tooltip-dotted { border-bottom: 1px dotted; cursor: help; } 567ab0781901eeeb93077ef25052613364378d1e Template:YEAR 10 508 1030 2021-08-17T01:21:54Z Infobox-person>MusikBot II 0 Changed protection settings for "[[Template:YEAR]]": [[Wikipedia:High-risk templates|High-risk template or module]] 62847 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <includeonly>{{#if: {{{1|}}} |{{#iferror:{{#time:Y|1 January {{{1|}}} }} |{{#iferror:{{#time:Y|{{{1|}}} }} |{{#ifeq:{{{2|}}}|{{{2}}}|error|{{error|Error}}}} |{{#time:Y|{{{1|}}} }} }} |{{#time:Y|1 January {{{1|}}} }} }} |{{CURRENTYEAR}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 397274250b850cd58a73ae0feb580b3f511afb46 Module:Redirect 828 404 816 2021-09-10T07:46:37Z Infobox-person>Johnuniq 0 restore p.getTargetFromText which is used by [[Module:RfD]] which is causing "Lua error in Module:RfD at line 87: attempt to call upvalue 'getTargetFromText' (a nil value)" Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 About 0 610 1244 2021-09-16T00:56:50Z History of science and technology on the Indian subcontinent>Wbm1058 0 should implement in [[Module:About]]. Piped {{!}} links causing false positives. wikitext text/x-wiki {{#invoke:about|about}}<noinclude> {{Documentation}} </noinclude> 34b07e47d9b8220bf56dd9882945ad464b21a731 Sidebar/styles.css 0 609 1242 2021-09-20T01:15:45Z History of science and technology on the Indian subcontinent>Goszei 0 self-rv, it's a little tight text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Template:Main 10 441 896 2021-11-07T22:34:09Z Infobox-person>Nihiltres 0 Includeonly the template to avoid errors on the template pages wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Main 0 601 1226 2021-11-07T22:34:09Z History of science and technology on the Indian subcontinent>Nihiltres 0 Includeonly the template to avoid errors on the template pages wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Template:Main other 10 412 832 2021-12-10T16:08:06Z Infobox-person>Xaosflux 0 <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Main other 0 586 1196 2021-12-10T16:08:06Z History of science and technology on the Indian subcontinent>Xaosflux 0 <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Module:Navbox/styles.css 828 461 936 2021-12-21T22:10:10Z Infobox-person>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Navbox/styles.css 0 608 1240 2021-12-21T22:10:10Z History of science and technology on the Indian subcontinent>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Template:Ifsubst 10 406 820 2022-01-02T08:48:20Z Infobox-person>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:No redirect 10 512 1038 2022-01-02T09:07:18Z Infobox-person>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Request quotation 0 635 1294 2022-01-02T09:22:48Z History of science and technology on the Indian subcontinent>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Request quotation}} begin-->{{Fix | subst = <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly> | link = Wikipedia:Verifiability | text = need quotation to verify | title = Quotation needed from source to verify. {{{reason|}}} | date = {{{date|}}} | cat-date = Category:Wikipedia articles needing factual verification }}<!--{{Request quotation}} end--> }}<noinclude> {{Documentation}} </noinclude> 1994f69cdcf29fb2b25edad36e83eae42aa0274b Module:Navbar/styles.css 828 458 930 2022-01-03T23:12:15Z Infobox-person>Izno 0 navbar styles that were moved to parent templates text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Navbar/styles.css 0 607 1238 2022-01-03T23:12:15Z History of science and technology on the Indian subcontinent>Izno 0 navbar styles that were moved to parent templates text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Template:Pluralize from text 10 483 980 2022-01-09T17:59:39Z Infobox-person>MusikBot II 0 Protected "[[Template:Pluralize from text]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 18336 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:Detect singular|pluralize}}<noinclude>{{documentation}}</noinclude> 305f4b531ea5639895c83cecd0fd809f7f5cf845 Template:Small 10 443 900 2022-01-17T03:43:07Z Infobox-person>Explicit 0 [[Wikipedia:Templates for discussion/Log/2022 January 10#Template:Smaller]] closed as merge ([[WP:XFDC#4.0.12|XFDcloser]]) wikitext text/x-wiki <span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude> {{Documentation}}<!--Categories and interwikis go in the /doc sub-page.--> </noinclude> 76d3535c2917cc3bfb1b032506073faa15e1a480 Module:Infobox/styles.css 828 419 848 2022-01-18T15:18:00Z Infobox-person>Jdlrobson 0 Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]] text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:TableTools 828 14 852 2022-01-31T13:08:18Z Infobox-person>MSGJ 0 updates/fixes requested by [[User:Uzume]] Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Short description/lowercasecheck 0 587 1198 2022-02-12T16:35:05Z History of science and technology on the Indian subcontinent>ToBeFree 0 Changed protection settings for "[[Template:Short description/lowercasecheck]]": 4 million transclusions, through [[Template:Short description]] ([[WP:HRT]]) ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#ifeq:<!--test first character for lower-case letter-->{{#invoke:string|find|1={{{1|}}}|2=^%l|plain=false}}|1 |<!-- first character is a lower case letter; test against whitelist -->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist--> |c. <!--for circa--> |gTLD |iMac |iOS |iOS, |iPad |iPhone |iTunes |macOS |none |pH |pH-dependent=<!-- end whitelist; short description starts with an allowed lower-case string; whitelist matched; do nothing --> |#default=<!-- apply category to track lower-case short descriptions -->{{main other|[[Category:Pages with lower-case short description|{{trim|{{{1|}}}}}]]}}{{Testcases other|{{red|CATEGORY APPLIED}}}}<!-- end whitelist test -->}} |<!-- short description does not start with lower-case letter; do nothing; end lower-case test --> }}<noinclude> {{documentation}} </noinclude> 9a6d4db14b74614625fd234b4f8ee3c8e1a235c0 Module:Check for unknown parameters 828 415 840 2022-02-21T05:24:13Z Infobox-person>BusterD 0 Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Template:Replace 10 484 982 2022-02-23T02:25:08Z Infobox-person>Xaosflux 0 Changed protection settings for "[[Template:Replace]]": 1MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|plain={{{plain|true}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude> 4192ba916713e0f44fdfd0f8e0d9d105c0c85472 Module:Effective protection expiry 828 445 904 2022-02-23T10:59:29Z Infobox-person>Xaosflux 0 Changed protection settings for "[[Module:Effective protection expiry]]": used in the mediawiki interface / match [[Module:Effective protection level]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Template link general 828 425 864 2022-03-08T08:30:51Z Infobox-person>Primefac 0 update from sandbox - fixes to _show_result and adding _expand Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Transliteration 0 629 1282 2022-03-14T21:07:34Z History of science and technology on the Indian subcontinent>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lang|transl}}</includeonly><noinclude> {{documentation}} </noinclude> cf981ec0dfa428550086604e3a81e36da231f3df Template:Documentation 10 12 1048 2022-03-29T02:14:34Z Infobox-person>Bsherr 0 consistent with new substitution template format wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Template:If empty 10 435 884 2022-04-03T20:56:41Z Infobox-person>Wugapodes 0 Changed protection settings for "[[Template:If empty]]": [[WP:High-risk templates|Highly visible template]]: used on 2 million pages and permanently cascade protected; matches module protection ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Transl 0 628 1280 2022-04-28T19:13:10Z History of science and technology on the Indian subcontinent>Paine Ellsworth 0 add [[WP:RCAT|rcat template]] wikitext text/x-wiki #REDIRECT [[Template:Transliteration]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} cff0d040d26c532c6c3a93a603e86991019a8fba Module:Uses Wikidata 828 520 1060 2022-06-08T17:12:17Z Infobox-person>Legoktm 0 fix capitalization of Wikidata and Wikipedia in query output Scribunto text/plain local p = {} function p.usesProperty(frame) local args = frame.getParent(frame).args or nil if mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li>[[File:Disc Plain blue dark.svg|middle|4px|link=|alt=]] <b><i>[[d:Property talk:" .. p_num .. "|" .. label .. " (" .. string.upper(p_num) .. ")]]</i></b> (see <span class='plainlinks'>[https://query.wikidata.org/embed.html#SELECT%20%3FWikidata_item_%20%3FWikidata_item_Label%20%3Fvalue%20%3FvalueLabel%20%3FEnglish_Wikipedia_article%20%23Show%20data%20in%20this%20order%0A%7B%0A%09%3FWikidata_item_%20wdt%3A" .. p_num .. "%20%3Fvalue%20.%20%23Collecting%20all%20items%20which%20have%20" .. p_num .. "%20data%2C%20from%20whole%20Wikidata%20item%20pages%0A%09OPTIONAL%20%7B%3FEnglish_Wikipedia_article%20schema%3Aabout%20%3FWikidata_item_%3B%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%7D%20%23If%20collected%20item%20has%20link%20to%20English%20Wikipedia%2C%20show%20that%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%20%7D%20%23Show%20label%20in%20this%20language.%20%22en%22%20is%20English.%20%20%20%0A%7D%0ALIMIT%201000 uses]</span>)</li>" ii = ii + 1 else break end end result = result.."</ul>" return result end function p.tuProperty(frame) local parent = frame.getParent(frame) local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(parent.args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li><span style='font-size:90%;line-height:1;'>●</span>&nbsp;&nbsp;<b>[[d:Property:" .. p_num .. "|" .. label .. "]]</b> <span style='font-size:90%;'>([[d:Property talk:" .. string.upper(p_num) .. "|" .. p_num .. "]])</span></li>" ii = ii + 1 else break end end result = result.."</ul>" return result end return p 8b704fdbc00fb94538c56f18c5c01f1e72963ea9 Module:Labelled list hatnote 828 453 920 2022-06-08T23:33:35Z Infobox-person>Nihiltres 0 Fixed iteration-and-removal bug Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Template:Reflist 10 431 876 2022-06-11T17:42:16Z Infobox-person>Izno 0 correct my error per [[Template talk:Reflist#liststyle and group]] wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><div class="reflist <!-- -->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!-- -->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!-- -->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class -->{{#if: {{{1|}}}<!-- start style --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}} | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}} }}> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 8c65cc88272db6c0f5cf2b49f84d3e460e60ee5f Reflist 0 596 1216 2022-06-11T17:42:16Z History of science and technology on the Indian subcontinent>Izno 0 correct my error per [[Template talk:Reflist#liststyle and group]] wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><div class="reflist <!-- -->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!-- -->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!-- -->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class -->{{#if: {{{1|}}}<!-- start style --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}} | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}} }}> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 8c65cc88272db6c0f5cf2b49f84d3e460e60ee5f Module:Message box/ombox.css 828 558 1136 2022-07-11T18:40:17Z Infobox-person>Izno 0 and move mbox-small to 720px here as well text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Text 828 491 996 2022-07-21T16:43:48Z Infobox-person>Hike395 0 update date Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2022-07-21", suite = "Text" } --[=[ Text utilities ]=] -- local globals local PatternCJK = false local PatternCombined = false local PatternLatin = false local PatternTerminated = false local QuoteLang = false local QuoteType = false local RangesLatin = false local SeekQuote = false local function initLatinData() if not RangesLatin then RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } end if not PatternLatin then local range PatternLatin = "^[" for i = 1, #RangesLatin do range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] ) end -- for i PatternLatin = PatternLatin .. "]*$" end end local function initQuoteData() -- Create quote definitions if not QuoteLang then QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } end if not QuoteType then QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } end end -- initQuoteData() local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite initQuoteData() local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" if not patternCJK then patternCJK = mw.ustring.char( 91, 4352, 45, 4607, 11904, 45, 42191, 43072, 45, 43135, 44032, 45, 55215, 63744, 45, 64255, 65072, 45, 65103, 65381, 45, 65500, 131072, 45, 196607, 93 ) end return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string initLatinData() return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end if not SeekQuote then SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK end return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed if not PatternCombined then PatternCombined = mw.ustring.char( 91, 0x0300, 45, 0x036F, 0x1AB0, 45, 0x1AFF, 0x1DC0, 45, 0x1DFF, 0xFE20, 45, 0xFE2F, 93 ) end decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r if not PatternTerminated then PatternTerminated = mw.ustring.char( 91, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" end if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r initLatinData() if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range for i = 1, #RangesLatin do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then initQuoteData() r = { } r.QuoteLang = QuoteLang r.QuoteType = QuoteType end return r end -- Text.test() -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 07f1fc4d39342fd92bdae1c5463bbfede7eeda1a Template:Para 10 502 1018 2022-07-22T08:06:17Z Infobox-person>TheDJ 0 breakup super long words, so we do not overflow the viewport. wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Template:Count 10 526 1072 2022-08-11T14:32:42Z Infobox-person>Neveselbert 0 cr. wikitext text/x-wiki {{safesubst<noinclude/>:#ifexpr:{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}>0|{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}|{{{base|0}}}}}<noinclude>{{documentation}}</noinclude> ccdb0aa784669ceae716044a9267ac7c4dea7283 Module:Hatnote 828 450 914 2022-09-05T18:18:32Z Infobox-person>Nihiltres 0 Reordered helper functions (first by export status, then alphabetically) and migrated p.quote upstream from [[Module:Redirect hatnote]] (includes contributions by Tamzin and Nihiltres) Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:URL 828 492 998 2022-09-11T18:55:11Z Infobox-person>Paine Ellsworth 0 per edit request on talk page - update Scribunto text/plain -- -- This module implements {{URL}} -- -- See unit tests at [[Module:URL/testcases]] local p = {} local function safeUri(s) local success, uri = pcall(function() return mw.uri.new(s) end) if success then return uri end end local function extractUrl(args) for name, val in pairs(args) do if name ~= 2 and name ~= "msg" then local url = name .. "=" .. val; url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url); if uri and uri.host then return url end end end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } } end else return text end end -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error url = mw.ustring.gsub(url, '#$', '') url = mw.ustring.gsub(url, '%?$', '') -- If it's an HTTP[S] URL without the double slash, fix it. url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url) -- Handle URL's without a protocol and URL's that are protocol-relative, -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then url = 'http://' .. url uri = safeUri(url) end if text == '' then if uri then if uri.path == '/' then uri.path = '' end local port = '' if uri.port then port = ':' .. uri.port end text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '') -- Add <wbr> before _/.-# sequences text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know. text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1") -- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1") text = mw.ustring.gsub(text,"(_+)","<wbr/>%1") else -- URL is badly-formed, so just display whatever was passed in text = url end end return mw.ustring.format('<span class="url">[%s %s]</span>', url, text) end --[[ The main entry point for calling from Template:URL. --]] function p.url(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' local msg = templateArgs.msg or parentArgs.msg or '' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' return p._url(url, text, msg) end --[[ The entry point for calling from the forked Template:URL2. This function returns no message by default. It strips out wiki-link markup, html tags, and everything after a space. --]] function p.url2(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' -- default to no message local msg = templateArgs.msg or parentArgs.msg or 'no' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' -- if the url came from a Wikidata call, it might have a pen icon appended -- we want to keep that and add it back at the end. local u1, penicon = mw.ustring.match( url, "(.*)(&nbsp;<span class='penicon.*)" ) if penicon then url = u1 end -- strip out html tags and [ ] from url url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "") -- truncate anything after a space url = url:gsub("%%20", " "):gsub(" .*", "") return (p._url(url, text, msg) or "") .. (penicon or "") end return p 8d7a4c6fe04a01815e940475cf64b28e1ef48cfb Module:Format link 828 449 912 2022-10-04T13:37:11Z Infobox-person>Pppery 0 Avoid Lua erroring when we run out of expensive parser function calls Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Protection banner 828 462 938 2022-10-21T08:07:11Z Infobox-person>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Template:Trim 10 468 950 2022-10-26T14:01:15Z Infobox-person>MSGJ 0 x parameter not needed wikitext text/x-wiki <includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 3d29fbfff9683523147db6e1f55c0e17ed30863b Trim 0 612 1248 2022-10-26T14:01:15Z History of science and technology on the Indian subcontinent>MSGJ 0 x parameter not needed wikitext text/x-wiki <includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 3d29fbfff9683523147db6e1f55c0e17ed30863b ISBN 0 627 1278 2022-11-27T20:08:59Z History of science and technology on the Indian subcontinent>GKFX 0 Update from sandbox: remove unnecessary {{trim}} and {{#if:}}, and make more readable. wikitext text/x-wiki <includeonly>{{#if:{{{1|}}}|{{Catalog lookup link |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}| article-link={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||{{#ifeq:{{yesno-yes|{{{link|}}}}}|no||ISBN (identifier)}}}} |article-name={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISBN}} |link-prefix=[Special:BookSources/ |item-prefix={{!}} |item-postfix=] |list-leadout={{{leadout|}}} }}{{#ifeq:{{yesno-no|{{{invalid1|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{1|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{2|}}} |{{#ifeq:{{yesno-no|{{{invalid2|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{2|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{3|}}} |{{#ifeq:{{yesno-no|{{{invalid3|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{3|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{4|}}} |{{#ifeq:{{yesno-no|{{{invalid4|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{4|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{5|}}} |{{#ifeq:{{yesno-no|{{{invalid5|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{5|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{6|}}} |{{#ifeq:{{yesno-no|{{{invalid6|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{6|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{7|}}} |{{#ifeq:{{yesno-no|{{{invalid7|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{7|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{8|}}} |{{#ifeq:{{yesno-no|{{{invalid8|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{8|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{9|}}} |{{#ifeq:{{yesno-no|{{{invalid9|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{9|}}}|template_name={{{template_name|ISBN}}}}}}}}}}}}}}}}}}}}}}}| {{error-small|Parameter error in {{tl|ISBN}}: Missing [[ISBN]].}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using ISBN template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:ISBN]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | invalid1 | invalid2 | invalid3 | invalid4 | invalid5 | invalid6 | invalid7 | invalid8 | invalid9 | leadout | link | plainlink |template_name }}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude> 113f1e5cb33437d5e9ada6d1e37a951670fae7d9 Template:Plainlist/styles.css 10 565 1150 2022-12-11T06:59:53Z Infobox-person>Izno 0 add this reset from mobile.css text text/plain /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Plainlist/styles.css 0 651 1326 2022-12-11T06:59:53Z History of science and technology on the Indian subcontinent>Izno 0 add this reset from mobile.css text text/plain /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Template:Indented plainlist 10 514 1042 2022-12-12T00:21:22Z Infobox-person>Izno 0 -raw plainlist wikitext text/x-wiki {{plainlist|class={{{class|}}}|style=margin-left:{{{in|{{{indent|1em}}}}}};text-indent:-{{{in|{{{indent|1em}}}}}};{{{style|}}}}}{{#if:{{{1|}}}| {{{1}}} {{endplainlist}}}}<noinclude></div> {{documentation}} </noinclude> 53356b0408eca171599999a642cb8ababe0874c7 Module:Side box 828 464 942 2022-12-13T04:33:19Z Infobox-person>Izno 0 we cookin with plainlist templatestyles now Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 096bef4a3721857fc16eb509a4f8d75973484485 Template:Mbox 10 399 806 2022-12-18T05:46:16Z Infobox-person>TadejM 0 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Short description 0 585 1194 2022-12-23T23:04:16Z History of science and technology on the Indian subcontinent>Fayenatic london 0 remove categories for several more namespaces, see [[Wikipedia:Categories for discussion/Log/2022 December 15#Pages with short description]] wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|<nowiki /><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> f175a6d61b40a87adb43e2dd4f73c7979759b34c Template:Hlist/styles.css 10 18 1154 2022-12-26T18:00:17Z Infobox-person>Izno 0 actually remove that block, someone can dig for authorship text text/plain /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Hlist/styles.css 0 652 1328 2022-12-26T18:00:17Z History of science and technology on the Indian subcontinent>Izno 0 actually remove that block, someone can dig for authorship text text/plain /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Module:Infobox 828 417 844 2022-12-27T21:29:12Z Infobox-person>Izno 0 merge hlist here Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Science in India 0 647 1318 2022-12-29T10:40:04Z History of science and technology on the Indian subcontinent>Rvsingh12 0 wikitext text/x-wiki {{Navbox |name = Science in India |title = [[Science and technology in India]] |state = {{{state|autocollapse}}} |bodyclass = hlist |group1 = |list1 = * [[Architecture of India|Architecture]] * [[Indian astronomy|Astronomy]] * [[Cartography of India|Cartography]] * [[Indian coinage|Coinage]] * [[Indian logic|Logic]] * [[Indian mathematics|Mathematics]] * [[Indian national calendar|National calendar]] * [[Engineering in India|Engineering]] |group2 = [[History of science and technology in the Indian subcontinent|History]] |list2 = * [[List of Indian inventions and discoveries|Inventions and discoveries]] * [[Indian maritime history|Maritime history]] * [[Military history of India|Military]] * [[History of measurement systems in India|Measurement systems]] * [[History of metallurgy in the Indian subcontinent|Metallurgy]] |group3 = [[Education in India|Education]] |list3 = * [[Higher education in India|Higher education]] * [[:Category:Research institutes in India|Research institutes]] ** [[Supercomputing in India|Supercomputing]] * [[:Category:Science museums in India|Science museums]] |group4 = Sectors |list4 = * [[Automotive industry in India|Auto]] * [[Biotechnology in India|Biotechnology]] * [[Chemical industry in India|Chemical]] * [[High-speed rail in India|High-speed rail]] * [[Information technology in India|IT]] ** [[:Category:Software companies of India|Software]] * [[Nuclear power in India|Nuclear power]] ** [[:Category:Nuclear technology in India|Technology]] * [[Pharmaceutical industry in India|Pharmaceuticals]] * [[Renewable energy in India|Renewable energy]] * [[Telecommunications in India|Telecommunications]] ** [[Mobile network operators of India|4G]] |group5 = People |list5 = * [[:Category:Indian engineers|Engineers]] * [[:Category:Indian inventors|Inventors]] * [[:Category:Indian Nobel laureates|Nobel laureates]] * [[:Category:Indian science writers|Science writers]] * [[:Category:Indian scientists|Scientists]] * [[:Category:Indian technology writers|Technology writers]] |group6 = Institutes and programs |list6 = * [[Ministry of Science and Technology (India)|Ministry of Science and Technology]] * [[National Centre for Polar and Ocean Research]] * [[Indian Space Research Organisation|ISRO]] * [[Defence Research and Development Organisation|DRDO]] * [[Council of Scientific and Industrial Research]] |below = * '''{{icon|category}} [[:Category:Science and technology in India|Category]]''' * '''{{Icon|Commons}} [[commons:Category:Science and technology in India|Commons]]''' }}<noinclude> {{collapsible option}} [[Category:India templates]] </noinclude> 0204cb8854d20255a420fb0d1150326209b66bf3 Template:Flatlist 10 411 830 2022-12-29T17:46:45Z Infobox-person>Izno 0 templatestyles obviates the need for hlist-separated wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> cf60aa4aef920d48fa394e786f72fe5f6dcd3169 Module:Navbox/configuration 828 460 934 2022-12-29T18:14:27Z Infobox-person>Izno 0 get these in Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbar/configuration 828 457 928 2022-12-29T18:18:21Z Infobox-person>Izno 0 add hlist/styles.css Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Detect singular 828 489 992 2023-01-02T22:05:13Z Infobox-person>Hike395 0 decode HTML entities Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') local getPlain = require('Module:Text').Text().getPlain -- function to determine whether "sub" occurs in "s" local function plainFind(s, sub) return mw.ustring.find(s, sub, 1, true) end -- function to count the number of times "pattern" (a regex) occurs in "s" local function countMatches(s, pattern) local _, count = mw.ustring.gsub(s, pattern, '') return count end local singular = 1 local likelyPlural = 2 local plural = 3 -- Determine whether a string is singular or plural (i.e., it represents one -- item or many) -- Arguments: -- origArgs[1]: string to process -- origArgs.no_comma: if false, use commas to detect plural (default false) -- origArgs.parse_links: if false, treat wikilinks as opaque singular objects (default false) -- Returns: -- singular, likelyPlural, or plural (see constants above), or nil for completely unknown function p._main(origArgs) origArgs = type(origArgs) == 'table' and origArgs or {} local args = {} -- canonicalize boolean arguments for key, default in pairs({no_comma=false,parse_links=false,any_comma=false,no_and=false}) do if origArgs[key] == nil then args[key] = default else args[key] = yesNo(origArgs[key],default) end end local checkComma = not args.no_comma local checkAnd = not args.no_and local rewriteLinks = not args.parse_links local anyComma = args.any_comma local s = origArgs[1] -- the input string if not s then return nil -- empty input returns nil end s = tostring(s) s = mw.text.decode(s,true) --- replace HTML entities (to avoid spurious semicolons) if plainFind(s,'data-plural="0"') then -- magic data string to return true return singular end if plainFind(s,'data-plural="1"') then -- magic data string to return false return plural end -- count number of list items local numListItems = countMatches(s,'<%s*li') -- if exactly one, then singular, if more than one, then plural if numListItems == 1 then return singular end if numListItems > 1 then return plural end -- if "list of" occurs inside of wlink, then it's plural if mw.ustring.find(s:lower(), '%[%[[^%]]*list of[^%]]+%]%]') then return plural end -- fix for trailing br tags passed through [[template:marriage]] s = mw.ustring.gsub(s, '<%s*br[^>]*>%s*(</div>)', '%1') -- replace all wikilinks with fixed string if rewriteLinks then s = mw.ustring.gsub(s,'%b[]','WIKILINK') end -- Five conditions: any one of them can make the string a likely plural or plural local hasBreak = mw.ustring.find(s,'<%s*br') -- For the last 4, evaluate on string stripped of wikimarkup s = getPlain(s) local hasBullets = countMatches(s,'%*+') > 1 local multipleQids = mw.ustring.find(s,'Q%d+[%p%s]+Q%d+') -- has multiple QIDs in a row if hasBullets or multipleQids then return plural end local commaPattern = anyComma and '[,;]' or '%D[,;]%D' -- semi-colon similar to comma local hasComma = checkComma and mw.ustring.find(s, commaPattern) local hasAnd = checkAnd and mw.ustring.find(s,'[,%s]and%s') if hasBreak or hasComma or hasAnd then return likelyPlural end return singular end function p._pluralize(args) args = type(args) == 'table' and args or {} local singularForm = args[3] or args.singular or "" local pluralForm = args[4] or args.plural or "" local likelyForm = args.likely or pluralForm local link = args[5] or args.link if link then link = tostring(link) singularForm = '[['..link..'|'..singularForm..']]' pluralForm = '[['..link..'|'..pluralForm..']]' likelyForm = '[['..link..'|'..likelyForm..']]' end if args[2] then return pluralForm end local detect = p._main(args) if detect == nil then return "" -- return blank on complete failure end if detect == singular then return singularForm elseif detect == likelyPlural then return likelyForm else return pluralForm end end function p.main(frame) local args = getArgs(frame) -- For template, return 1 if singular, blank if plural or empty local result = p._main(args) if result == nil then return 1 end return result == singular and 1 or "" end function p.pluralize(frame) local args = getArgs(frame) return p._pluralize(args) end return p 6afb2e8c0bd8ddff094e2861b836521ee4a5a779 Template:Large 10 516 1046 2023-01-16T01:12:34Z Infobox-person>Jonesey95 0 use this template's own documentation wikitext text/x-wiki <span style="font-size:120%">{{{1}}}</span><noinclude> {{Documentation}} </noinclude> 8ba6ec8c3178e22dc1f05aa239df8a2b052be668 Module:Side box/styles.css 828 560 1140 2023-01-19T20:36:50Z Infobox-person>TheDJ 0 use display flow-root to force a new Block formatting context text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Side box/styles.css 0 648 1320 2023-01-19T20:36:50Z History of science and technology on the Indian subcontinent>TheDJ 0 use display flow-root to force a new Block formatting context text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Template:Notice 10 513 1040 2023-01-25T22:32:14Z Infobox-person>Izno 0 per tper wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Module:If empty 828 436 886 2023-01-26T18:33:28Z Infobox-person>MSGJ 0 lastk is not needed Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Module:Exponential search 828 447 908 2023-02-10T20:10:53Z Infobox-person>Uzume 0 strict Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:Lua banner 828 545 1110 2023-02-16T14:39:53Z Infobox-person>Uzume 0 [[Module:Citation]] has been blanked since [[Wikipedia:Templates for discussion/Log/2018 May 13#Module:Citation]]; remove special handling Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Science and technology in India 0 649 1322 2023-02-22T19:59:39Z History of science and technology on the Indian subcontinent>Andrybak 0 add category sort key wikitext text/x-wiki {{Sidebar |name = Science and technology in India |bodystyle = width: {{{width|18.0em}}}; border: 1px solid #aabaaa; |basestyle = background: #cb4154; |topimage = [[File:Details_of_the_top_of_iron_pillar,_Qutub_Minar,_Delhi.jpg|100px|alt=The Iron Pillar of Delhi.]] |title = [[History of science and technology in India|{{color|white|History of science and<br />technology in the <br />Indian subcontinent}}]] |headingstyle = padding-top: 0; color: white; |contentclass = hlist |contentstyle = padding-top: 0.2em; |content1 = * [[List of Indian inventions and discoveries|Inventions]] * [[Science and technology in India|Science in India]] * [[Science and technology in Bangladesh|Science in Bangladesh]] * [[Science and technology in Pakistan|Science in Pakistan]] |heading2 = By subject |content2 = * [[Indian mathematics|Mathematics]] * [[Indian astronomy|Astronomy]] * [[Indian national calendar|Calendar]] * [[History of measurement systems in India|Measurement systems]] ** [[Indian units of measurement|Units of measurement]] * [[Cartography of India|Cartography]] * [[Indian geography|Geography]] * [[History_of_printing#In_India|Printing]] * [[History of metallurgy in the Indian subcontinent|Metallurgy]] * [[Indian coinage|Coinage]] * [[History of metallurgy in the Indian subcontinent|Indian Alchemy]] * [[Ayurveda|Traditional medicine]] * [[History of agriculture in India|Agriculture]] * [[History of education in the Indian subcontinent|Education]] * [[Indian architecture|Architecture]] ** [[List of bridges in India|Bridges]] * [[Transport in India|Transport]] ** [[Indian maritime history|Maritime history]] ** [[Naval history of India|Navigation]] * [[Military history of India|Military]] }}<noinclude> [[Category:India history templates]] [[Category:India science and nature templates]] [[Category:India sidebar templates]] [[Category:Technology and applied science sidebar templates|India]] </noinclude> 391ed08e7760ac115ac7f6062f73b94d7eeef463 Wikiquote 0 634 1292 2023-03-06T08:37:08Z History of science and technology on the Indian subcontinent>Mclay1 0 merging in custom text function from [[Template:Wikiquotehas]] wikitext text/x-wiki {{Sister project |project=wikiquote |text=Wikiquote has {{{3|quotations related to}}} '''''[[q:{{{1|Special:Search/{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}]]'''''. }}<noinclude> {{Documentation}} </noinclude> 6faad160b81cfbd2ffe6cd485ea2c2e7d4334f24 Template:Marriage/styles.css 10 567 1156 2023-04-24T16:04:33Z Infobox-person>Pppery 0 text text/plain /* {{pp-template}} */ .marriage-line-margin2px { line-height: 0; margin-bottom: -2px; } .marriage-line-margin3px { line-height: 0; margin-bottom: -3px; } .marriage-display-ws { display: inline; white-space: nowrap; } c7f451088a54f39897051a4421a9d8c5a9a1b23d Template:Documentation subpage 10 528 1076 2023-04-29T17:27:17Z Infobox-person>Paine Ellsworth 0 m wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 History of technology 0 640 1304 2023-04-30T14:43:58Z History of science and technology on the Indian subcontinent>Wombat140 0 wikitext text/x-wiki {{navbox | name = History of technology | title = [[History of technology]] | listclass = hlist | state = {{{state<includeonly>|autocollapse</includeonly>}}} | list1 = * '''History of technology cultures''' * [[Outline of prehistoric technology|Prehistoric technology]] * [[Neolithic Revolution|Neolithic]] * [[Ancient Egyptian technology|Ancient Egypt]] * [[Maya civilization|Mayan]] * [[Inca technology|Inca]] * [[Ancient Greek technology|Ancient Greek]] * [[Roman technology|Roman]] * [[History of science and technology in China|Chinese]] * [[History of science and technology in the Indian subcontinent|Indian]] * [[List of Byzantine inventions|Byzantine]] * [[Science in the medieval Islamic world|Medieval Islam]] * [[Medieval technology|Medieval Europe]] * [[Renaissance technology|Renaissance]] * [[Science and technology in the Ottoman Empire|Ottoman]] * [[Great Divergence]] * [[Industrial Revolution]] * [[Technology|Modern]] | list2 = * '''History of technology domains''' * [[History of biotechnology]] * [[History of communication]] * [[History of computing]] * [[History of computing hardware]] * [[Electrical engineering#History|History of electrical engineering]] * [[History of materials science]] * [[History of measurement]] * [[History of medicine]] * [[Nuclear technology#History and scientific background|History of nuclear technology]] * [[History of transport]] }}<noinclude> {{Documentation}} </noinclude> fb773a59e632323774607331b785fe0e66e18baa Module:Navbox 828 459 932 2023-05-28T13:26:56Z Infobox-person>Uzume 0 strict Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Template:High-use 10 538 1096 2023-05-30T09:39:48Z Infobox-person>Lectonar 0 Changed protection settings for "[[Template:High-use]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Module:Transclusion count 828 542 1104 2023-05-30T20:51:38Z Infobox-person>Isabelle Belato 0 Changed protection settings for "[[Module:Transclusion count]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Template:Samp 10 533 1086 2023-06-14T15:35:10Z Infobox-person>Taravyvan Adijene 0 абнаўленьне зьвестак wikitext text/x-wiki <samp {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-left:0.4em; padding-right:0.4em; color:{{{color|#666666}}}; {{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</samp><noinclude> <!--Categories go near the bottom of the /doc page.--> {{Documentation}} </noinclude> f6ab5d4006d47b4412736ea88bf42847cfb57a40 Module:Person height 828 497 1008 2023-07-03T19:22:01Z Infobox-person>Frietjes 0 fix for leading zero Scribunto text/plain -- This module implements [[Template:Infobox person/height]] local p = {} local function splitsuffix(s) local suffix = '' if mw.ustring.match(s,'^(.-)(<sup.*)$') then local a = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%2') s = a suffix = b .. suffix end if mw.ustring.match(s,'^(.-)(%[%[[Cc]ategory:.*)$') then local a = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%2') s = a suffix = b .. suffix end return s, suffix end local function clean(s) s = mw.ustring.gsub(s, '[Mm]etre', 'm') s = mw.ustring.gsub(s, '([^a])meter', '%1m') -- prevents "parameter" from being changed to "param" s = mw.ustring.gsub(s, '[Cc]enti', 'c') -- changes "centim" to "cm" s = mw.ustring.gsub(s, 'ms', 'm') s = mw.ustring.gsub(s, 'm[%.,]', 'm') s = mw.ustring.gsub(s, '[Ff]eet', 'ft') s = mw.ustring.gsub(s, 'foot', 'ft') s = mw.ustring.gsub(s, 'ft[%.,]', 'ft') s = mw.ustring.gsub(s, '[Ii]nches', 'in') s = mw.ustring.gsub(s, '[Ii]nch', 'in') s = mw.ustring.gsub(s, 'ins', 'in') s = mw.ustring.gsub(s, 'in[%.,]', 'in') s = mw.ustring.gsub(s, '%[%[[Mm]%]%]s', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Mm]|[Mm]%]%]', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Cc]m%]%]s', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]m|[Cc]m%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]entim|cm%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Ii]n|in%]%]', '[[inch|in]]') s = mw.ustring.gsub(s, '(%d)%s+[Cc][Mm]', '%1&nbsp;cm') s = mw.ustring.gsub(s, '(%d)%s+[Mm]', '%1&nbsp;m') s = mw.ustring.gsub(s, '(%d)%s+[Ff][Tt]', '%1&nbsp;ft') s = mw.ustring.gsub(s, '(%d)%s+[Ii][Nn]', '%1&nbsp;in') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Cc][Mm]', '%1cm') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Mm]', '%1m') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ff][Tt]', '%1ft') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ii][Nn]', '%1in') s = mw.ustring.gsub(s, '(%d)%s*[′\']%s*([%d]%d*)%s*[\"″]', '%1 ft %2 in') return s end local function isnumber(s) if s then s = mw.ustring.gsub(s, '%+%s*%d+%s*/%s*%d+%s*$', '') s = mw.ustring.gsub(s, '%s*1%s*/%s*2%s*$', '0.5') return tonumber(s) end return nil end local function trimspace(s) if s then s = mw.ustring.gsub(s, '^%s*(.-)%s*$', '%1') end return s end local function force_unit(s, t) s = mw.ustring.gsub(s, '&[Nn][Bb][Ss][Pp];', '★') if (t == 'cm') then s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)m', '%1%2.%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2.%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)m', '%1%2%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)m', '%1%20%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%20%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)m', '%100.%2cm') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100.%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+cm)', '%1') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+%[%[[Cc]entimet[re][re]|cm%]%])', '%1') else s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') end s = mw.ustring.gsub(s, '★', '&nbsp;') return s end local function get_convert_args(s, prefer, enforce, ri) local prefer_m = (prefer or '') == 'm' local force_m = (enforce or '') == 'm' local prefer_cm = (prefer or '') == 'cm' local force_cm = (enforce or '') == 'cm' ri = (ri or '') == 'cmin' and 'cmin' or '' unconverted = clean(s or '') -- basic unit cleaning s = mw.ustring.gsub(unconverted, '&[Nn][Bb][Ss][Pp];', ' ') local m = mw.ustring.find(s, 'm') local c = mw.ustring.find(s, 'cm') local f = mw.ustring.find(s, 'ft') local i = mw.ustring.find(s, 'in') if m == nil and f == nil and i == nil then return '', unconverted end local adj = nil if c ~= nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, c - 1) if isnumber(n) then if force_m then local prec = require("Module:Math")._precision(trimspace(n)) adj = (prec == 1) and 'ri3' or 'ri2' end if ri ~= '' then adj = force_m and 'ri2' or 'ri0' end return force_m and {n/100,'m','ftin',0,['abbr']='on', ['adj']=adj} or {n,'cm','ftin',0,['abbr']='on', ['adj']=adj}, mw.ustring.sub(s, c+2) end return '', unconverted end if m ~= nil and c == nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, m - 1) if ri ~= '' then adj = force_cm and 'ri0' or 'ri2' end if isnumber(n) then return force_cm and {n*100,'cm','ftin',0,['abbr']='on',['adj']=adj} or {n,'m','ftin',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, m+1) end return '', unconverted end if f ~= nil and i ~=nil and m == nil then local n1 = mw.ustring.sub(s, 1, f - 1) local n2 = mw.ustring.sub(s, f+2, i - 1) if isnumber(n1) and isnumber(n2) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n1,'ft',n2,'in', 'm',2,['abbr']='on',['adj']=adj} or {n1,'ft',n2,'in', 'cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, i+2) end return '', unconverted end if f ~= nil and i == nil and m == nil then local n = mw.ustring.sub(s, 1, f - 1) if isnumber(n) then if ri ~= '' then local n2 = 12*(n - math.floor(n)) adj = 'ri0' return (force_m or prefer_m) and {math.floor(n),'ft',n2, 'in','m',2,['abbr']='on',['adj']=adj} or {math.floor(n),'ft',n2,'in','cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, f+2) end return (force_m or prefer_m) and {n,'ft','m',2,['abbr']='on'} or {n,'ft','cm',0,['abbr']='on'}, mw.ustring.sub(s, f+2) end return '', unconverted end if i ~= nil and f == nil and m == nil then local n = mw.ustring.sub(s, 1, i - 1) if isnumber(n) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n,'in','m',2,['abbr']='on'} or {n,'in','cm',0,['abbr']='on'}, mw.ustring.sub(s, i+2) end return '', unconverted end if force_cm and c == nil then return '', force_unit(unconverted, 'cm') end if force_m and c ~= nil then return '', force_unit(unconverted, 'm') end return '', unconverted end function convert(frame, args) local str, suffix = splitsuffix(args[1] or '') local targs, str = get_convert_args(str, args['prefer'] or '', args['enforce'] or '', args['ri'] or '') str = str .. suffix if type(targs) == 'table' then return frame:expandTemplate{ title = 'convert', args = targs} .. str else return str end end function p.main(frame) return convert(frame, frame.args[1] and frame.args or frame:getParent().args) end return p eae45d697c1881086eab11f622b4400e5c177c63 Module:Parameter names example 828 546 1112 2023-07-10T09:41:44Z Infobox-person>Gonnym 0 if these are wanted, they should be handled differently (by passing a parameter to this module) as these cause pages to appear as unknown parameters for templates that don't use them Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end --targs['nocat'] = 'yes'; --targs['categories'] = 'no'; --targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p fdf94fb7a5dc1fabf118d60488a02f1e65b0df24 Module:WikidataIB 828 471 956 2023-07-10T18:09:04Z Infobox-person>Pppery 0 Per edit request Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, 1, "mul" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end if found then break end end -- loop through fallback table end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- cdfad4f2433151e512d5023478c35bceaf5c980a Template:Tooltip 10 479 972 2023-07-11T17:54:26Z Infobox-person>Paine Ellsworth 0 Undid revision 1164881729 by [[Special:Contributions/Paine Ellsworth|Paine Ellsworth]] ([[User talk:Paine Ellsworth|talk]]) srv per my talk page wikitext text/x-wiki <templatestyles src="Template:Tooltip/styles.css" />{{#ifeq:{{yesno-no|{{{link}}}}}|yes |[[{{{1}}}|<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>]] |<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span> }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using tooltip with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Tooltip]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | class | dotted | id | link | style }}<noinclude> {{Documentation|Template:Abbr/doc}} </noinclude> 0bc4ac1b7ea7d4f2cdbb94b76559770a78cd10d9 Module:Lang 828 389 784 2023-07-28T21:46:18Z Infobox-person>Trappist the monk 0 Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transliteration' == template then category = 'Transliteration'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transliteration}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transliteration'); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transliteration'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transliteration'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transliteration'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transliteration'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transliteration'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transliteration'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; b4bf37fa610695625e5f1ff5d33471dfaaf8af34 Template:Param value 10 552 1124 2023-07-29T17:59:50Z Infobox-person>MusikBot II 0 Protected "[[Template:Param value]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 134494 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <code style="border:{{{border|{{{b|thin solid #caa}}}}}};background-color:{{{bg-color|{{{bg|white}}}}}};padding:1px 2px 0 1px;margin:0 2px 0 1px;white-space:nowrap;{{{style|}}}">{{replace|{{replace|{{replace|{{replace|{{replace|<includeonly>⊗ϑ{{{1|}}}⊗ϑ</includeonly><noinclude>value</noinclude>| |{{{space|{{{sp|&nbsp;}}}}}}}}|#|&#35;}}|*|&#42;}}|:|&#58;}}|⊗ϑ|}}</code><noinclude> {{Documentation}} </noinclude> 6298b021570fa18e8e9016184d0b7a3c00563553 History of South Asia 0 644 1312 2023-08-10T16:34:22Z History of science and technology on the Indian subcontinent>খাঁ শুভেন্দু 0 wikitext text/x-wiki {{Sidebar with collapsible lists | name = History of South Asia | bodyclass = plainlist | titlestyle = padding-bottom:0.5em; font-size:130%; | title = [[South Asia#History|History of South Asia]] |region = South Asia |image = [[File:South Asia (orthographic projection) without national boundaries.svg|150px|South Asia (orthographic projection)]] | listtitlestyle = background:transparent;text-align:left;padding-right:4em; | list1name = South Asian Palaeolithic | list1title = [[Outline of South Asian history|Outline]] | list1 = {{Sidebar with collapsible lists | bodyclass = plainlist | titlestyle = padding-bottom:0.5em; font-size:130%; | listtitlestyle = background:transparent;text-align:left;padding-right:4em; | list1name = South Asian Palaeolithic | list1title = [[South Asian Stone Age|Palaeolithic]] {{nobold|(2,500,000–250,000 BC)}} | list1 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Madrasian culture|Madrasian culture]]| | [[Soanian|Soanian culture]]| }} | list2name = South Asian Neolithic | list2title = [[South Asian Stone Age|Neolithic]] {{nobold|(10,800–3300 BC)}} | list2 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Bhirrana|Bhirrana culture]] | (7570–6200 BC) | [[Mehrgarh|Mehrgarh culture]] | (7000–3300 BC) | [[Edakkal Caves|Edakkal culture]] | (5000–3000 BC) }} | list3name = South Asian Copper Age | list3title = [[Chalcolithic]] {{nobold|(3500–1500 BC)}} | list3 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Anarta tradition]] | ({{Circa|3950}}–1900 BC) | [[Ahar–Banas culture|Ahar-Banas culture]] | (3000–1500 BC) | [[Pandu Rajar Dhibi|Pandu culture]] | (1600–1500 BC) | [[Malwa culture|Malwa culture]] | (1600–1300 BC) | [[Jorwe culture|Jorwe culture]] | (1400–700 BC) }} | list4name = South Asian Bronze Age | list4title = [[Bronze Age India|Bronze Age]] {{nobold|(3300–1300 BC)}} | list4 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Indus Valley Civilisation]] |(3300–1300 BC) | &nbsp;– [[Indus Valley Civilisation#Early_Harappan|Early Harappan culture]] |(3300–2600 BC) | &nbsp;– [[Indus Valley Civilisation#Mature_Harappan|Mature Harappan culture]] |(2600–1900 BC) | &nbsp;– [[Cemetery H culture|Late Harappan culture]] |(1900–1300 BC) | [[Vedic period|Vedic Civilisation]] |(2000–500 BC) | &nbsp;– [[Ochre Coloured Pottery culture]] |(2000–1600 BC) | &nbsp;– [[Gandhara grave culture|Swat culture]] |(1600–500 BC) }} | list5name = Iron Age India | list5title = [[Iron Age in India|Iron Age]] {{nobold|(1500–200 BC)}} | list5 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Vedic period|Vedic Civilisation]] |(1500–500 BC) | &nbsp;– [[Janapada]]s | (1500–600 BC) | &nbsp;– [[Black and red ware|Black and Red ware culture]] |(1300–1000 BC) | &nbsp;– [[Painted Grey Ware culture]] | (1200–600 BC) | &nbsp;– [[Northern Black Polished Ware]] | (700–200 BC) | [[Pradyota dynasty]] | (799–684 BC) | [[Haryanka dynasty]] | (684–424 BC) | [[Three Crowned Kings|Three Crowned Kingdoms]] | ({{Circa|600 BC}} – AD 1600) | [[Mahajanapadas|Maha Janapadas]] | ({{Circa|600}}–300 BC) | [[Achaemenid Empire]] | (550–330 BC) | Ror Dynasty | (450 BC – AD 489) | [[Shaishunaga dynasty]] | (424–345 BC) | [[Nanda Empire]] | (380–321 BC) | [[Macedonian Empire]] | (330–323 BC) | [[Maurya Empire]] | (321–184 BC) | [[Seleucid Empire|Seleucid India]] | (312–303 BC) | [[Sangam period]] | ({{Circa|600 BC|300 AD}}) | [[Pandya dynasty|Pandya Empire]] | ({{Circa|300 BC}} – AD 1345) | [[Chera dynasty|Chera Kingdom]] | ({{Circa|300 BC}} – AD 1102) | [[Chola dynasty|Chola Empire]] | ({{Circa|300 BC}} – AD 1279) | [[Pallava dynasty|Pallava Empire]] | ({{Circa|250 AD}} – AD 800) | [[Mahameghavahana dynasty|Maha-Megha-Vahana Empire]] | ({{Circa|250 BC|AD 500}}) | [[Parthian Empire]] | (247 BC – AD 224) }} | list6name = Middle kingdoms of India | list6title = [[Middle kingdoms of India|Middle Kingdoms]] {{nobold|(230 BC – AD 1206)}} | list6 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Satavahana dynasty|Satavahana Empire]] | (230 BC – AD 220) | [[Kuninda Kingdom]] | (200 BC – AD 300) | [[Mitra dynasty (Mathura)|Mitra Dynasty]] | ({{Circa|150|50 BC}}) | [[Shunga Empire]] | (185–73 BC) | [[Indo-Greek Kingdom]] | (180 BC – AD 10) | [[Kanva dynasty|Kanva Empire]] | (75–26 BC) | [[Indo-Scythians|Indo-Scythian Kingdom]] | (50 BC – AD 400) | [[Indo-Parthian Kingdom]] | (AD 21 – {{Circa|130}}) | [[Western Satraps|Western Satrap Empire]] | (AD 35–405 ) | [[Kushan Empire]] | (AD 60–240) | [[Nagas of Padmavati|Bharshiva Dynasty]] | (170–350) | [[Nagas of Padmavati]] | (210–340) | [[Sasanian Empire]] | (224–651) | [[Kushano-Sasanian Kingdom|Indo-Sassanid Kingdom]] | (230–360) | [[Vakataka dynasty|Vakataka Empire]] | ({{Circa|250|500}}) | [[Kalabhra dynasty|Kalabhras Empire]] | ({{Circa|250|600}}) | [[Gupta Empire]] | (280–550) | [[Kadamba dynasty|Kadamba Empire]] | (345–525) | [[Western Ganga dynasty|Western Ganga Kingdom]] | (350–1000) | [[Kamarupa|Kamarupa Kingdom]] | (350–1100) | [[Vishnukundina dynasty|Vishnukundina Empire]] | (420–624) | [[Maitraka dynasty|Maitraka Empire]] | (475–767) | [[Huna people|Huna Kingdom]] | (475–576) | [[Rai dynasty|Rai Kingdom]] | (489–632) | [[Hindu Shahis|Kabul Shahi Empire]] | ({{Circa|500}} – 1026) | [[Chalukya dynasty|Chalukya Empire]] | (543–753) | [[Maukhari dynasty|Maukhari Empire]] | ({{Circa|550|700}}) | [[Harsha|Harsha Empire]] | (606–647) | [[Tibetan Empire]] | (618–841) | [[Eastern Chalukyas|Eastern Chalukya Kingdom]] | (624–1075) | [[Rashidun Caliphate]] | (632–661) | [[Gurjara-Pratihara dynasty|Gurjara-Pratihara Empire]] | (650–1036) | [[Umayyad Caliphate]] | (661–750) | [[Mallabhum kingdom]] | (694-1947) | [[Bhauma-Kara dynasty|Bhauma-Kara Kingdom]] | (736-916) | [[Pala Empire]] | (750–1174) | [[Rashtrakuta dynasty|Rashtrakuta Empire]] | (753–982) | [[Paramara dynasty|Paramara Kingdom]] | (800–1327) | [[Seuna (Yadava) dynasty|Yadava Empire]] | (850–1334) | [[Somavamshi dynasty|Somavamshi Kingdom]] | (882–1110) | [[Chaulukya dynasty|Chaulukya Kingdom]] | (942–1244) | [[Western Chalukya Empire]] | (973–1189) | [[Lohara dynasty|Lohara Kingdom]] | (1003–1320) | [[Hoysala Empire]] | (1040–1347) | [[Sena dynasty|Sena Empire]] | (1070–1230) | [[Eastern Ganga dynasty|Eastern Ganga Empire]] | (1078–1434) | [[Kakatiya dynasty|Kakatiya Kingdom]] | (1083–1323) | [[Zamorin|Zamorin Kingdom]] | (1102–1766) | [[Kalachuris of Tripuri]] | (675-1210) | [[Kalachuris of Kalyani]] | (1156–1184) | [[Chutia Kingdom|Chutiya Kingdom]] | (1187–1673) | [[Deva dynasty|Deva Kingdom]] | ({{Circa|1200|1300}}) }} | list7name = Late medieval period | list7title = [[Medieval India|Late medieval period]] {{nobold|(1206–1526)}} | list7 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Ghaznavids|Ghaznavid Dynasty]] | (977–1186) | [[Ghurid dynasty|Ghurid Dynasty]] | (1170–1206) | [[Delhi Sultanate]] | (1206–1526) | &nbsp;– [[Mamluk dynasty (Delhi)|Mamluk Sultanate]] | (1206–1290) | &nbsp;– [[Khalji dynasty|Khalji Sultanate]] | (1290–1320) | &nbsp;– [[Tughlaq dynasty|Tughlaq Sultanate]] | (1320–1414) | &nbsp;– [[Sayyid dynasty|Sayyid Sultanate]] | (1414–1451) | &nbsp;– [[Lodi dynasty|Lodi Sultanate]] | (1451–1526) | [[Ahom kingdom|Ahom Kingdom]] | (1228–1826) | [[Nayakas of Chitradurga|Chitradurga Kingdom]] | (1300–1779) | [[Reddi Kingdom|Reddy Kingdom]] | (1325–1448) | [[Vijayanagara Empire]] | (1336–1646) | [[Bengal Sultanate]] | (1352–1576) | [[Garhwal Kingdom]] | (1358–1803) | [[Kingdom of Mysore|Mysore Kingdom]] | (1399–1947) | [[Gajapati Empire]] | (1434–1541) | [[Namgyal dynasty of Ladakh|Ladakh Kingdom ]] | (1470–1842) | [[Deccan sultanates|Deccan Sultanates]] | (1490–1596) | &nbsp;– [[Ahmadnagar Sultanate]] | (1490–1636) | &nbsp;– [[Berar Sultanate]] | (1490–1574) | &nbsp;– [[Bidar Sultanate]] | (1492–1619) | &nbsp;– [[Adil Shahi dynasty|Bijapur Sultanate]] | (1492–1686) | &nbsp;– [[Qutb Shahi dynasty|Golkonda Sultanate]] | (1518–1687) | [[Nayakas of Keladi|Keladi Kingdom]] | (1499–1763) | [[Koch dynasty|Koch Kingdom]] | (1515–1947) }} | list8name = Early modern period | list8title = [[Early modern period]] {{nobold|(1526–1858)}} | list8 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Mughal Empire]] | (1526–1858) | [[Sur Empire]] | (1540–1556) | [[Madurai Nayak dynasty|Madurai Kingdom]] | (1529–1736) | [[Thanjavur Nayak kingdom|Thanjavur Kingdom]] | (1532–1673) | [[Bhoi dynasty]] | (1541–1804) | [[Bengal Subah]] | (1576–1757) | [[Ramnad estate|Marava Kingdom]] | (1600–1750) | [[Kingdom of Sikkim|Sikkim Kingdom]] | (1642–1975) | [[Tondaiman|Thondaiman Kingdom]] | (1650–1948) | [[Maratha Empire]] | (1674–1818) | [[Misl|Sikh Confederacy]] | (1707–1799) | [[Travancore|Travancore Kingdom]] | (1729–1947) | [[Sikh Empire]] | (1799–1849) }} | list9name = Colonial India | list9title = [[Colonial India|Colonial states]] {{nobold|(1510–1961)}} | list9 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Portuguese India]] | (1510–1961) | [[Dutch India]] | (1605–1825) | [[Danish India]] | (1620–1869) | [[French India]] | (1759–1954) | [[Company rule in India|Company Raj]] | (1757–1858) | [[British Raj]] | (1858–1947) }} }} | list11name = National histories | list11title = National histories | list11 = {{hlist | [[History of Afghanistan|Afghanistan]] | [[History of Bangladesh|Bangladesh]] | [[History of Bhutan|Bhutan]] | [[History of India (1947–present)|India]] | [[History of the Maldives|Maldives]] | [[History of Nepal|Nepal]] | [[History of Pakistan|Pakistan]] | [[History of Sri Lanka|Sri Lanka]] }} | list12name = Regional histories | list12title = Regional histories | list12 = {{hlist | [[History of Assam|Assam]] | [[History of Balochistan|Balochistan]] | [[History of Bengal|Bengal]] | [[History of Bihar|Bihar]] | [[History of Gujarat|Gujarat]] | [[History of Himachal Pradesh|Himachal Pradesh]] | [[History of Kabul|Kabul]] | [[History of Karnataka|Karnataka]] | [[History of Kashmir|Kashmir]] | [[History of Khyber Pakhtunkhwa|Khyber Pakhtunkhwa]] | [[History of Rajasthan|Rajasthan]] | [[History of Maharashtra|Maharashtra]] | [[History of Uttar Pradesh|Uttar Pradesh]] | [[History of Punjab|Punjab]] | [[History of Odisha|Odisha]] | [[History of Sindh|Sindh]] | [[History of South India|South India]] | [[History of Tamil Nadu|Tamil Nadu]] | [[History of Tibet|Tibet]] }} | list13name = Specialised histories | list13title = Specialised histories | list13 = {{hlist | [[History of agriculture in the Indian subcontinent|Agriculture]] | [[Architecture of India|Architecture]] | [[Coinage of India|Coinage]] | [[Demographics of India#History|Demographics]] | [[List of Indian monarchs|Dynasties]] | [[Economic history of India|Economy]] | [[History of education in the Indian subcontinent|Education]] | [[Indology]] | [[History of Indian influence on Southeast Asia|Influence on Southeast Asia]] | [[Linguistic history of India|Language]] | [[Indian literature|Literature]] | [[Indian maritime history|Maritime]] | [[History of metallurgy in the Indian subcontinent|Metallurgy]] | [[Military history of India|Military]] | [[Partition of India]] | [[Pakistan studies]] | [[Indian philosophy|Philosophy]] | [[Indian religions#History|Religion]] | [[History of science and technology in the Indian subcontinent|Science and technology]] | [[Timeline of Indian history|Timeline]] }} }}<noinclude> {{documentation |content = This template shows topics to do with the History of South Asia. [[Category:Asia history templates|South]] [[Category:Historical period templates]] }}</noinclude> 70bac7b914ceec1a68c9ab0389742639e8a55797 Template:Visible anchor 10 509 1032 2023-08-19T16:03:20Z Infobox-person>Paine Ellsworth 0 update wikitext text/x-wiki <templatestyles src="Template:Visible anchor/styles.css" /><span class="vanchor"><!-- -->{{#if:{{{1|}}}|<span id="{{{1}}}"></span>}}<!-- -->{{#if:{{{2|}}}|<span id="{{{2}}}"></span>}}<!-- -->{{#if:{{{3|}}}|<span id="{{{3}}}"></span>}}<!-- -->{{#if:{{{4|}}}|<span id="{{{4}}}"></span>}}<!-- -->{{#if:{{{5|}}}|<span id="{{{5}}}"></span>}}<!-- -->{{#if:{{{6|}}}|<span id="{{{6}}}"></span>}}<!-- -->{{#if:{{{7|}}}|<span id="{{{7}}}"></span>}}<!-- -->{{#if:{{{8|}}}|<span id="{{{8}}}"></span>}}<!-- -->{{#if:{{{9|}}}|<span id="{{{9}}}"></span>}}<!-- -->{{#if:{{{10|}}}|<span id="{{{10}}}"></span>}}<!-- --><span class="vanchor-text">{{{text|{{{1}}}}}}</span><!-- -->{{#if:{{{11|}}}|<span class="error">[[Template:Visible anchor]]: too many anchors, maximum is 10.</span>}}<!-- --></span><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE; INTERWIKIS GO TO WIKIDATA, THANK YOU! --> </noinclude> 291421f0e3c11a13eea17d283cc3d18aa587bbf7 Template:UF-hcard-person 10 561 1142 2023-08-22T10:48:21Z Infobox-person>PK2 0 bypass redirect to [[Template:Flatlist]] wikitext text/x-wiki The HTML markup produced by this template includes an [[HCard|hCard microformat]], which makes the person's details [[Parsing|parsable]] by computers, either acting automatically to catalogue articles across Wikipedia or via a browser tool operated by a reader, to (for example) add the subject to an address book or database. For more information about the use of [[microformat]]s on Wikipedia, please see [[Wikipedia:WikiProject Microformats|the microformat project]]. === Sub-templates === Date-of-birth ("bday") information will only be included in the microformat if {{tl|birth date}}, or {{tl|birth date and age}} are used in the infobox. ([[Wikipedia:WikiProject Microformats/dates|Do not use these if the date is before 1583]]). Be cautious about using these if the person is still living, per [[WP:DOB]]. To include a URL, use {{Tl|URL}}. '''Please do not remove instances of these sub-templates.''' === Classes === hCard uses HTML classes including: {{Flatlist| *adr *agent *bday *birthplace *category *country-name *deathdate *deathplace *extended-address *family-name *fn (required) *given-name *honorific-prefix *honorific-suffix *label *locality *n *nickname *note *org *role *url *vcard }} '''Please do not rename or remove these classes nor collapse nested elements which use them.'''<includeonly>{{#ifeq:{{SUBPAGENAME}}|doc | |{{#ifeq:{{SUBPAGENAME}}|sandbox | |[[Category:Templates generating hCards]]}} }}</includeonly><noinclude> [[Category:Templates generating hCards]] [[Category:Microformat (uF) message templates]] </noinclude> cf7d7c17b9e4a925f11599e609ceb43d23ba29ea History of science 0 645 1314 2023-08-25T22:45:26Z History of science and technology on the Indian subcontinent>Ho Pak-chuen 0 "The Golden Age of Islam" already exist as "Science in the medieval Islamic world" wikitext text/x-wiki {{Navbox | name = History of science | state = {{{state|}}} | image = [[File:Johannes-kepler-tabulae-rudolphinae-google-arts-culture.jpg|80px]] | bodyclass = hlist | title = [[History of science]] | group1 = Background | list1 = * [[Sociology of the history of science|Theories and sociology]] * [[Historiography of science|Historiography]] * [[History of pseudoscience|Pseudoscience]] * [[History and philosophy of science]] | group2 = By era | list2 = * [[Science in the ancient world|Ancient world]] * [[Science in classical antiquity|Classical Antiquity]] * [[European science in the Middle Ages|Medieval European]] * [[History of science in the Renaissance|Renaissance]] * [[Scientific Revolution]] * [[Science in the Age of Enlightenment|Age of Enlightenment]] * [[Romanticism in science|Romanticism]] | group3 = By culture | list3 = * [[History of science and technology in Africa|African]] * [[History of science and technology in Argentina|Argentine]] * [[History of science and technology in Brazil|Brazilian]] * [[Byzantine science|Byzantine]] * [[History of science and technology in France|French]] * [[History of science and technology in China|Chinese]] * [[History of science and technology in the Indian subcontinent|Indian]] * [[Science in the medieval Islamic world|Medieval Islamic]] * [[History of science and technology in Japan|Japanese]] * [[History of science and technology in Korea|Korean]] * [[History of science and technology in Mexico|Mexican]] * [[History of science and technology in Russia|Russian]] * [[History of science and technology in Spain|Spanish]] | group4 = [[History of natural science|Natural sciences]] | list4 = * [[History of astronomy|Astronomy]] * [[History of biology|Biology]] * [[History of chemistry|Chemistry]] * [[Outline_of_Earth_sciences#History_of_Earth_science|Earth science]] * [[History of physics|Physics]] | group5 = [[History of mathematics|Mathematics]] | list5 = * [[History of algebra|Algebra]] * [[History of calculus|Calculus]] * [[History of combinatorics|Combinatorics]] * [[History of geometry|Geometry]] * [[History of logic|Logic]] * [[History of probability|Probability]] * [[History of statistics|Statistics]] * [[History of trigonometry|Trigonometry]] | group6 = [[History of the social sciences|Social sciences]] | list6 = * [[History of anthropology|Anthropology]] * [[History of archaeology|Archaeology]] * [[History of economic thought|Economics]] * [[History]] * [[History of political science|Political science]] * [[History of psychology|Psychology]] * [[History of sociology|Sociology]] | group7 = [[History of technology|Technology]] | list7 = * [[History of agricultural science|Agricultural science]] * [[History of computer science|Computer science]] * [[History of materials science|Materials science]] * [[History of engineering|Engineering]] | group8 = [[History of medicine|Medicine]] | list8 = * [[History of medicine|Human medicine]] * [[History of veterinary medicine|Veterinary medicine]] * [[History of anatomy|Anatomy]] * [[History of neuroscience|Neuroscience]] * [[History of neurology and neurosurgery |Neurology and neurosurgery ]] * [[History of nutrition|Nutrition]] * [[History of pathology|Pathology]] * [[History of pharmacy|Pharmacy]] | belowclass = hlist | belowstyle = margin-right:0.5em;<!--(see liststyle)--> padding:0.1em 0 0.4em;line-height:1.7em; | below = * {{icon|List}} [[List of timelines#Science|Timelines]] * {{nowrap|{{icon|Portal}} [[Portal:History of science|Portal]]}} * {{nowrap|{{icon|Category}} [[:Category:History of science|Category]]}} }}<noinclude> {{documentation|content= {{collapsible option}} [[Category:History of science templates| ]] }} </noinclude> f86c98c3942cd528eb7bbb61c5dee54992c5fef1 Module:Message box 828 402 812 2023-09-02T22:54:30Z Infobox-person>Anomie 0 [[:File:Cscr-featured.svg]] needs a link to the description page for license and attribution. Add the ability for the configuration to specify a flag to accomplish this. Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Module:Unicode data/scripts 828 465 944 2023-09-13T19:41:55Z Infobox-person>Drmccreedy 0 Update for Unicode v15.1 Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x031EF] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2EBF0, 0x2EE5D, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data 6afbaa9e21efd3898f0ff056b5456c0cd5813400 Template:Film- and television-related infobox templates 10 557 1134 2023-09-15T04:24:20Z Infobox-person>InfiniteNexus 0 wikitext text/x-wiki {{Navbox | name = Film- and television-related infobox templates | title = Film- and television-related infobox templates | listclass = hlist | state = {{{state|autocollapse}}} | group1 = [[Wikipedia:List of infoboxes#Film|Film]] | list1 = * [[Template:Infobox film|Film]] ** [[Template:Infobox film/short description|/short description]] * [[Template:Infobox film or theatre festival|Film or theatre festival]] * [[Template:Infobox art movement|Art movement]] * [[Template:Infobox cinema market|Cinema market]] * [[Template:Infobox movie quote|Movie quote]] | group2 = [[Wikipedia:List of infoboxes#Television|Television]] | list2 = * [[Template:Infobox television|Television]] * [[Template:Infobox television season|Television season]] ** [[Template:Infobox reality competition season|Reality competition season]] * [[Template:Infobox television episode|Television episode]] ** [[Template:Infobox television crossover episode|crossover]] *** [[Template:Infobox television crossover episode/part|/part]] ** ''[[Template:Infobox Doctor Who episode|Doctor Who]]'' ** ''[[Template:Infobox Futurama episode|Futurama]]'' ** ''[[Template:Infobox Simpsons episode|Simpsons]]'' * [[Template:Infobox animanga/Video|Animanga]] | group3 = Misc video | list3 = * ''[[Template:Infobox Paris by Night|Paris by Night]]'' * [[Template:Infobox machinima|Machinima]] | group4 = Industry | list4 = * [[Template:Infobox award|Award]] * [[Template:Infobox awards list|Awards list]] * [[Template:Infobox film awards|Film awards]] ** [[Template:Infobox film awards/link|/link]] ** [[Template:Infobox film awards/style|/style]] * [[Template:Infobox broadcasting network|Broadcasting network]] * [[Template:Infobox television channel|Television channel]] * [[Template:Infobox television station|Television station]] * [[Template:Infobox programming block|Programming block]] * [[Template:Infobox presenter|Presenter]] | group5 = [[Wikipedia:List of infoboxes#Photography|Technical]] | list5 = * [[Template:Infobox camera|Camera]] * [[Template:Infobox movie camera|Movie camera]] * [[Template:Infobox camera mount|Camera mount]] * [[Template:Infobox photographic lens|Photographic lens]] * [[Template:Infobox lens design|Lens design]] * [[Template:Infobox photographic film|Photographic film]] | group6 = [[Wikipedia:List of infoboxes#Fictional elements|Fiction]] | list6 = * [[Template:Infobox fictional artifact|Artifact]] * [[Template:Infobox character|Character]] ** [[Template:Infobox Doctor Who doctor|Doctor Who doctor]] ** [[Template:Infobox G.I. Joe character|''G.I. Joe'']] ** [[Template:Infobox soap character|Soap opera]] * [[Template:Infobox fictional family|Family]] ** [[Template:Infobox fictional family/member|Family member]] * [[Template:Infobox fictional location|Location]] * [[Template:Infobox fictional organisation|Organisation]] * [[Template:Infobox fictional race|Race]] * [[Template:Infobox fictional vehicle|Vehicle]] | group7 = Template modules | list7 = * [[Template:Infobox name module|Name module]] * [[Template:Based on|Based on]] * [[Template:Infobox person|Person]] * [[Template:Listen|Listen]] | group8 = Related | list8 = * [[Template:Infobox advertising|Advertising]] * [[Template:Infobox media franchise|Media franchise]] * [[Template:Infobox audio drama|Audio drama]] * [[Template:Infobox podcast|Podcast]] * [[Template:Infobox radio station|Radio station]] * [[Template:Infobox radio show|Radio show]] }}<noinclude> {{Documentation}} </noinclude> 194d6ca46eda0a7ea7550c9c6dce0440fc9c303e Template:Tracks Wikidata 10 551 1122 2023-10-06T19:37:14Z Infobox-person>SWinxy 0 {{Section link}} wikitext text/x-wiki {{Sister project | image = [[File:Wikidata-logo-with-magnifying-glass-icon.svg|40px|link=Wikipedia:Wikidata]] | position = {{{position|}}} | text = This {{template other | template | {{module other | module | {{category other | category | page <!-- not template, module, or category --> }} }} }} [[:Category:{{{cat|Wikidata tracking categories}}}|tracks]] {{#if:{{{section|}}} | one or more [[Wikidata]] properties; see {{Section link||{{{section}}}}} for details. | the [[Wikidata]] propert{{#if:{{{2|}}}|ies:|y:}} {{#invoke:Uses Wikidata|usesProperty}} }} }}<includeonly>{{#switch:{{SUBPAGENAME}} |sandbox |testcases |doc= <!--no category--> |#default = {{template other | [[Category:Templates tracking Wikidata]] | {{module other | [[Category:Modules tracking Wikidata]] | {{category other | <!-- if used in a category, don't automatically add parent category --> | <!-- not template, module, or category --> }} }} }} }}</includeonly><noinclude> {{Documentation}}<!-- Add categories and interwikis to the /doc sub-page --> </noinclude> 42e72b2011b4a187af0427756de66dc2772894cc Template:Parameter names example 10 548 1116 2023-10-08T00:30:05Z Infobox-person>Shkuru Afshar 0 wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 256a11b9ae7ac7e492b3d9de86ade1ffa96bffd1 Module:Navbar 828 456 926 2023-10-10T22:34:57Z Infobox-person>Pppery 0 Per edit request on talk Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 047f307758c878eb3e99ed1768cc40920a6ec5fa Module:String 828 416 842 2023-10-25T18:17:50Z Infobox-person>Trappist the monk 0 Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 2ad0905c56ef4955950b75a8f00974fe82aed5e4 Template:Marriage 10 495 1004 2023-10-27T00:09:56Z Infobox-person>Pppery 0 Per request on talk wikitext text/x-wiki <templatestyles src="Template:Marriage/styles.css"/> {{#if:{{{1|}}}||{{#if:{{{2|}}}{{{3|}}}{{{end|{{{reason|}}}}}} |{{#ifeq:{{{1|+}}}|{{{1|-}}}|<div class="marriage-line-margin3px">&#8203;</div>|{{main other|[[Category:Marriage template errors|Z{{PAGENAME}}]]}}}}}}}} <div class="marriage-display-ws">{{#if:{{{1|}}} |{{trim|{{#if:{{{end|{{{reason|}}}}}} |<div style="display:inline-block;line-height:normal;{{#if:{{{2|}}}{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2=20|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|<div class="marriage-line-margin2px">&#8203;</div>}} |{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2=20 |3=<div class="marriage-line-margin2px">&#8203;</div>}} }}}} |<div style="display:inline-block;line-height:normal;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}} |3=<div class="marriage-line-margin2px">&#8203;</div>}}}} }}}}}}&#32;<div style="display:inline-block;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-bottom:1px;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-bottom:1px;|4={{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|margin-bottom:1px;}}}}}}}}">&#8203;</div>&#40;<!-- -->{{#if:{{{2|}}} |{{#ifeq:{{{end|{{{reason|+}}}}}}| |{{#switch:{{{3|}}} | = after&nbsp;}} |{{abbr|m.|married}}&nbsp;}}{{#ifeq:{{{2|}}}|{{YEAR|{{{2|}}}}} |{{{2|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{2|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}}|{{YEAR|{{{2|}}}}}}}|2={{{2|}}}}} }} |{{#if:{{{3|}}}{{{end|{{{reason|}}}}}}||{{#if:{{#property:P570}}||{{main other|[[Category:Marriage template errors|N{{PAGENAME}}]]}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}||{{#if:{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} | {{main other|[[Category:Marriage template errors|B{{PAGENAME}}]]}}before&nbsp;{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} |{{error-small|date missing}}}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}{{{3|}}}|&#44;&#32;}}}}}} }}{{#if:{{{3|}}} |{{#ifeq:{{{end|{{{reason|}}}}}}| |{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|{{#ifeq:{{{end|+}}}|{{{end|-}}} |{{#ifeq:{{{end|+}}}|{{{end|-}}} | until | before }} |{{#ifeq:{{{reason|+}}}|{{{reason|-}}} | until | before }}}}&nbsp;}} |{{#if:{{{2|}}} |&#59;&#32; }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" --> | div | div. | divorce | divorced = {{abbr|div.|divorced}}&nbsp; | sep | sep. | separated = {{abbr|sep.|separated}}&nbsp; <!-- commonly used reason for end --> | ann | ann. | annulled | annulment = {{abbr|ann.|annulled}}&nbsp; <!-- commonly used reason for end --> | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}}&nbsp; | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}}&nbsp; }} }}{{#ifeq:{{{3|}}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }} |{{{3|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{3|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }}}}|2={{{3|}}}}} }} |{{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}} }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died | div | div. | divorce | divorced = divorced | sep | sep. | separated = separated | ann | ann. | annulled | annulment = annulled | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason&nbsp}} | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}} }} }}&#41;<wbr />&#8203;</div><!-- -->{{#invoke:Parameter validation|validateparams|module_options = Module:Parameter validation/default config}}<noinclude> {{documentation}} </noinclude> 75d18d741552275c7a425891372cff59f5eccca5 Module:Documentation/config 828 11 1052 2023-10-28T01:25:16Z Infobox-person>Pppery 0 Split [[Category:Templates sandboxes]] per CfD Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 56b6127664e31128dea1cecf2e392cf9313df6a3 Module:Hatnote list 828 452 918 2023-11-13T21:00:31Z Infobox-person>Nihiltres 0 Updated from sandbox: added support for punctuation collapse when text is italicized. The update's content includes changes by users Johnuniq, Dexxor, and Nihiltres. Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation at end of string, ignoring italics and links local function punctuationCollapse (text) return text:match("[.?!]('?)%1(%]?)%2%.$") and text:sub(1, -2) or text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p 1c8e6212115f76ecc3db8d05137011cd18207988 Template:Infobox person 10 387 780 2023-11-18T23:41:03Z Infobox-person>Neveselbert 0 display:inline-block wikitext text/x-wiki {{#invoke:infobox|infoboxTemplate|child={{{child|{{{embed|}}}}}} | bodyclass = biography vcard | above = {{Br separated entries | 1 = {{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal; display:inline-block;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}</div>}} | 2 = <div class="fn" style="display:inline-block">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}</div> | 3 = {{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal; display:inline-block;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}</div>}} }} | abovestyle = font-size:125%; {{{abovestyle|}}} | subheaderstyle = font-size:125%; font-weight:bold; | subheader = {{#switch:{{{child|{{{embed|}}}}}}|yes=<!--empty when this infobox is embedded-->|#default={{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}} }} }} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|300|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}}x200px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}} | label2 = Pronunciation | data2 = {{{pronunciation|}}} | label10 = Born | data10 = {{Br separated entries|1={{#if:{{{birth_name|{{{birthname|}}}}}}|<div style="display:inline" class="nickname">{{{birth_name|{{{birthname|}}}}}}</div>}}|2={{{birth_date|}}}|3={{#if:{{{birth_place|}}}|<div style="display:inline" class="birthplace">{{{birth_place|}}}</div>}}}} | label11 = Bapti{{#if:{{{baptized|}}}|z|s}}ed | data11 = {{#if:{{{birth_date|}}}||{{{baptized|{{{baptised|}}}}}}}} | label12 = Disappeared | data12 = {{Br separated entries|1={{{disappeared_date|}}}|2={{{disappeared_place|}}}}} | label13 = Status | data13 = {{{status|{{{disappeared_status|}}}}}} | label14 = Died | data14 = {{Br separated entries|1={{{death_date|}}}|2={{#if:{{{death_place|}}}|<div style="display:inline" class="deathplace">{{{death_place|}}}</div>}}}} | label15 = Cause&nbsp;of death | data15 = {{{death cause|{{{death_cause|}}}}}} | label16 = Body discovered | data16 = {{{body discovered|{{{body_discovered|}}}}}} | label17 = {{#if:{{{burial_place|}}}|Burial place|Resting place}} | data17 = {{#if:{{{burial_place|}}}|{{Br separated entries|1={{{burial_place|}}}|2={{{burial_coordinates|}}}}}|{{Br separated entries|1={{{resting place|{{{resting_place|{{{restingplace|}}}}}}}}}|2={{{resting place coordinates|{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}}}}}}}} | class17 = label | label18 = Monuments | data18 = {{{monuments|}}} <!-- removed per discussion at https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_person&oldid=932429196#Residence_parameter | label19 = Residence | data19 = {{{residence|}}} | class19 = {{#if:{{{death_date|}}}{{{death_place|}}}||label}} --> | label20 = Nationality | data20 = {{{nationality|}}} | class20 = category | label21 = Other&nbsp;names | data21 = {{{other names|{{{other_names|{{{othername|{{{nickname|{{{alias|}}}}}}}}}}}}}}} | class21 = nickname | label22 = Siglum | data22 = {{{siglum|}}} | label23 = Citizenship | data23 = {{{citizenship|}}} | class23 = category | label24 = Education | data24 = {{{education|}}} | label25 = Alma&nbsp;mater | data25 = {{{alma mater|{{{alma_mater|}}}}}} | label26 = Occupation{{Pluralize from text|{{{occupation|}}}|likely=(s)|plural=s}} | data26 = {{{occupation|}}} | class26 = role | label27 = Years&nbsp;active | data27 = {{{years active|{{{years_active|{{{yearsactive|}}}}}}}}} | label28 = Era | data28 = {{{era|}}} | class28 = category | label29 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data29 = {{{employer|}}}{{main other|{{Pluralize from text| {{{employer|}}}|likely=[[Category:Pages using infobox person with multiple employers]]}}}} | class29 = org | label30 = {{#if:{{{organisation|}}}|Organisation|Organization}}{{#if:{{{organizations|}}}|s|{{pluralize from text|{{{organization|{{{organisation|}}}}}}|likely=(s)|plural=s}}}} | data30 = {{{organisation|{{{organization|{{{organizations|}}}}}}}}}{{main other|{{Pluralize from text|{{{organization|{{{organisation|}}}}}}|likely=[[Category:Pages using infobox person with multiple organizations]]}}}} | class30 = org | label31 = Agent{{Pluralize from text|{{{agent|}}}|likely=(s)|plural=s}} | data31 = {{{agent|}}}{{main other|{{Pluralize from text|{{{agent|}}}|likely=[[Category:Pages using infobox person with multiple agents]]}}}} | class31 = agent | label32 = Known&nbsp;for | data32 = {{{known for|{{{known_for|{{{known|}}}}}}}}} | label33 = Works | data33 = {{{works|}}} | label34 = <span style="white-space:nowrap;">Notable credit{{Pluralize from text|{{{credits|}}}|likely=(s)|plural=s}}</span> | data34 = {{#if:{{{works|}}}||<!-- -->{{{credits|}}}{{main other|{{Pluralize from text|{{{credits|}}}|likely=[[Category:Pages using infobox person with multiple credits]]}}}}}} | label35 = Label{{Pluralize from text|{{{label_name|}}}|likely=(s)|plural=s}} | data35 = {{#if:{{{works|}}}{{{credits|}}}||<!-- -->{{{label_name|}}}{{main other|{{Pluralize from text|{{{label_name|}}}|likely=[[Category:Pages using infobox person with multiple labels]]}}}}}} | label36 = <span style="white-space:nowrap;">Notable work</span> | data36 = {{#if:{{{works|}}}{{{credits|}}}{{{label_name|}}}||{{{notable works|{{{notable_works|}}}}}}}} | label37 = Style | data37 = {{{style|}}} | class37 = category | label40 = Television | data40 = {{{television|}}} | label41 = Height | data41 = {{#if:{{{height_m|{{{height_cm|}}}}}}{{{height_ft|}}}{{{height_in|}}} | {{convinfobox|{{{height_m|{{{height_cm|}}}}}}|{{#if:{{{height_m|}}}|m|cm}}|{{{height_ft|}}}|ft|{{{height_in|}}}|in}}}}{{#if:{{{height|}}} | {{infobox person/height|{{{height|}}}}}}} | label42 = {{#if:{{{office|}}}|Office|Title}} | data42 = {{{office|{{{title|}}}}}} | class42 = title | label43 = Term | data43 = {{{term|}}} | label44 = Predecessor | data44 = {{{predecessor|}}} | label45 = Successor | data45 = {{{successor|}}} | label46 = Political party | data46 = {{{party|}}} | class46 = org | label47 = Other political<br />affiliations | data47 = {{{otherparty|}}} | class47 = org | label48 = Movement | data48 = {{{movement|}}} | class48 = category | label49 = Opponent{{Pluralize from text|{{{opponents|}}}|likely=(s)|plural=s}} | data49 = {{{opponents|}}}{{main other|{{Pluralize from text|{{{opponents|}}}|likely=[[Category:Pages using infobox person with multiple opponents]]}}}} | label50 = Board member&nbsp;of | data50 = {{{boards|}}} | label51 = {{#if:{{{criminal_charges|}}}|Criminal charges|Criminal charge{{pluralize from text|{{{criminal charge|{{{criminal_charge|}}}}}}|likely=(s)|plural=s}}}} | data51 = {{{criminal_charges|{{{criminal charge|{{{criminal_charge|}}}}}}}}}{{main other|{{Pluralize from text|{{{criminal charge|{{{criminal_charge|}}}}}}|likely=[[Category:Pages using infobox person with multiple criminal charges]]}}}} | label52 = Criminal penalty | data52 = {{{criminal penalty|{{{criminal_penalty|}}}}}} | label53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}}|Judicial status|Criminal status}} | data53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}} | {{{judicial status|{{{judicial_status}}}}}} | {{{criminal status|{{{criminal_status|}}}}}}}} | class53 = category | label54 = Spouse{{#if:{{{spouses|}}}|s|{{Pluralize from text|{{{spouse|{{{spouse(s)|}}}}}}|likely=(s)|plural=s}}}} | data54 = {{{spouse|{{{spouses|{{{spouse(s)|}}}}}}}}}{{main other|{{Pluralize from text| {{{spouse|{{{spouse(s)|}}}}}} |likely=[[Category:Pages using infobox person with multiple spouses]]}}}} | label55 = Partner{{#if:{{{partners|}}}|s|{{Pluralize from text|{{{partner|{{{domesticpartner|{{{domestic_partner|{{{partner(s)|}}}}}}}}}}}} |likely=(s)|plural=s}}}} | data55 = {{{partner|{{{domesticpartner|{{{domestic_partner|{{{partners|{{{partner(s)|}}}}}}}}}}}}}}}{{main other|{{Pluralize from text| {{{partner|{{{domesticpartner|{{{domestic_partner|{{{partner(s)|}}}}}}}}}}}} |likely=[[Category:Pages using infobox person with multiple partners]]}}}} | label56 = Children | data56 = {{{children|}}} | label57 = Parent{{#if:{{{parents|}}}|{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|s}}}} | data57 = {{#if:{{{parents|}}}|{{{parents}}}|{{Unbulleted list|{{#if:{{{father|}}}|{{{father}}} (father)}}|{{#if:{{{mother|}}}|{{{mother}}} (mother)}}}}}}<!-- -->{{main other|{{Pluralize from text|{{{parents|}}}|likely=[[Category:Pages using infobox person with multiple parents]]}}}} | label58 = Relatives | data58 = {{{relations|{{{relatives|}}}}}} | label59 = Family | data59 = {{{family|}}} | label60 = Call sign | data60 = {{{callsign|}}} | label61 = Awards | data61 = {{{awards|}}} | label62 = {{#if:{{{honours|}}}|Honours|Honors}} | data62 = {{{honours|{{{honors|}}}}}} | data64 = {{{misc|{{{module|}}}}}} | data65 = {{{misc2|{{{module2|}}}}}} | data66 = {{{misc3|{{{module3|}}}}}} | data67 = {{{misc4|{{{module4|}}}}}} | data68 = {{{misc5|{{{module5|}}}}}} | data69 = {{{misc6|{{{module6|}}}}}} | label70 = Website | data70 = {{{website|{{{homepage|{{{URL|{{{url|}}}}}}}}}}}} | header71 = {{#if:{{{signature|}}}|{{if empty|{{{signature_type|}}}|Signature}}}} | data72 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|sizedefault=150px|alt={{{signature alt|{{{signature_alt|}}}}}}}} | header73 = {{#if:{{{footnotes|}}}|Notes}} | data74 = {{#if:{{{footnotes|}}}|<div style="text-align: left;">{{{footnotes}}}</div>}} }}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=n<!--this check deliberately flags empty unknown parameters; see talk, December 2022--> | abovestyle | agent | alias | alma mater | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | birthname | boards | body discovered | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal charge | criminal penalty | criminal status | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death cause | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | honors | honours | image | image caption | image size | image_caption | image_size | image_upright | imagesize | judicial status | judicial_status | known | known for | known_for | label_name | landscape | misc | misc2 | misc3 | misc4 | misc5 | misc6 | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | nationality | native_name | native_name_lang | nickname | nocat_wdimage | notable works | notable_works | occupation | office | opponents | organisation | organization | organizations | other names | other_names | othername | otherparty | parents | partner | partners | partner(s) | party | predecessor | pre-nominals | post-nominals | pronunciation | relations | relatives | resting place | resting place coordinates | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | siglum | signature | signature alt | signature_alt | signature_size | signature_type | spouse | spouses | spouse(s) | status | style | successor | template_name | television | term | title | URL | url | website | works | years active | years_active | yearsactive }}<!-- -->{{Main other|{{#if:{{{pronunciation|}}}|[[Category:Biography template using pronunciation]]}}<!-- -->{{#if:{{{signature|}}}|[[Category:Biography with signature]]}}<!-- -->[[Category:Articles with hCards]] }}<!-- -->{{#invoke:Check for clobbered parameters|check | nested = 1 | template = [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] | cat = {{main other|Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with conflicting parameters}} | child; embed | honorific prefix; honorific_prefix; honorific-prefix; pre-nominals | honorific suffix; honorific_suffix; honorific-suffix; post-nominals | image size; image_size; imagesize | image caption; caption; image_caption | birth_name; birthname | baptized; baptised | status; disappeared_status | death cause; death_cause | body discovered; body_discovered | resting place; resting_place; restingplace | resting place coordinates; resting_place_coordinates; restingplacecoordinates | other names; other_names; othername; nickname; alias | alma mater; alma_mater | years active; years_active; yearsactive | organisation; organization; organizations | known for= known_for; known | {{#if:{{{works|}}}|works;}} {{#if:{{{credits|}}}|credits;}} {{#if:{{{label_name|}}}|label_name;}} notable works; notable_works | height_m; height_cm | office; title | criminal_charges; criminal charge; criminal_charge | criminal penalty; criminal_penalty | judicial status; judicial_status | criminal status; criminal_status | spouse; spouses; spouse(s) | partner; domesticpartner; domestic_partner; partners; partner(s) | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{father|}}}||NULL_}}father | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{mother|}}}||NULL_}}mother | relations; relatives | honours; honors | misc; module | misc2; module2 | misc3; module3 | misc4; module4 | misc5; module5 | misc6; module6 | website; homepage; URL; url }}<includeonly>{{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}}}}}}</includeonly><noinclude> {{documentation}}</noinclude> bb6b966de0963b0452c3d6004bcb4981c5734904 Module:InfoboxImage 828 418 846 2023-11-21T13:26:24Z Infobox-person>WOSlinker 0 update strip maker detection as per request on talk page Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 35066ee19938554ca6eeb18d6e22d2063336b7e1 Module:Unicode data 828 390 786 2023-11-22T21:35:20Z Infobox-person>Pppery 0 Per edit request Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 05d32e957906aa3f5219ad820cb06d9a096ea697 Module:Message box/configuration 828 403 814 2023-11-24T02:41:46Z Infobox-person>Pppery 0 Per edit request Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } ccb6bdf2868087b6833d203307f2f6a92b3b0a01 Template:Template parameter usage 10 540 1100 2023-11-27T06:57:32Z Infobox-person>Sdkb 0 Partial revert of [[User:SUM1]]'s edit [[Special:Diff/1039918972]] per [[WP:CLICKHERE]] wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee a monthly parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}} in articles{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> 83e574f5e031df639a2cdcef5b91d6b1094ae648 Template:TemplateData header 10 539 1098 2023-12-01T11:27:04Z Infobox-person>Gonnym 0 fix website link if |1= is used wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> 748b89c815a11e78b365c5617460ea569f3f96cb Template:Crossreference 10 504 1022 2023-12-19T21:40:27Z Infobox-person>SMcCandlish 0 shorthand param wikitext text/x-wiki <templatestyles src="Crossreference/styles.css" />{{Hatnote inline |1={{{1|{{{text|{{{content|<noinclude>sample content</noinclude>}}}}}}}}} |extraclasses=crossreference {{{class|{{{extraclasses|}}}}}} |selfref={{#if:{{{selfref|{{{printworthy|{{{unprintworthy|{{{pw|}}}}}}}}}}}}||yes}} |inline={{{inline|true}}} }}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 974832216c2d5115ece5c3c5535216d80a26d876 Module:Hatnote inline 828 507 1028 2023-12-21T20:46:48Z Infobox-person>Ahecht 0 frame:newChild{title="Module:Hatnote inline", args = args} Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote-inline -- -- -- -- This module produces hatnote-style links, and links to related articles, -- -- but inside a <span>, instead of the <div> used by Module:Hatnote. It -- -- implements the {{hatnote-inline}} meta-template. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mArguments = require('Module:Arguments') local yesno = require('Module:Yesno') local p = {} function p.hatnoteInline (frame) local args = mArguments.getArgs(frame) local hatnote = mHatnote.hatnote(frame:newChild{title="Module:Hatnote inline", args = args}) if args.inline == nil or yesno(args.inline, true) then local subs = { ['<div'] = '<span', ['</div>$'] = '</span>' } for k, v in pairs(subs) do hatnote = string.gsub(hatnote, k, v, 1) end end return hatnote end p.hatnote = p.hatnoteInline --alias return p d7e9b9bfe56b41f5fe6b46d4971140145abe41bf Template:Hatnote inline 10 506 1026 2023-12-21T20:47:46Z Infobox-person>Ahecht 0 Directly invoke [[Module:Hatnote inline]] to reduce [[WP:PEIS]] wikitext text/x-wiki {{#invoke:Hatnote inline|hatnoteInline |1={{{1|{{{text|{{{content}}}}}}}}} |extraclasses={{{class|{{{extraclasses|}}}}}} |selfref={{#if:{{{printworthy|{{{selfref|}}}}}}||yes}} |category={{{category|}}} |inline={{{inline|true}}} }}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 338fff0fbaebe79b8f95df075f8c9d20aeed1d63 Template:Strongbad 10 544 1108 2023-12-24T23:35:54Z Infobox-person>SMcCandlish 0 punct wikitext text/x-wiki {{main other|{{FormattingError|Template:Strongbad is only for use in template documentation, guidelines, and other Wikipedia-internal purposes. Do not use it in actual articles.}}|{{strong|1={{{1}}}|style=color: red; {{{style|}}} |role={{{role|}}} |class={{{class|}}} |id={{{id|}}} |title={{{title|}}} }}}}<noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> 237cc27ab04d4824936787cc35a56e6f706fed71 Module:Age 828 454 922 2023-12-28T23:16:40Z Infobox-person>Johnuniq 0 output nothing for Template:Birth_date_and_age + Template:Death_date_and_age if 'YYYY' is first parameter to avoid TemplateData auto value errors from Template:Infobox_musical_artist Scribunto text/plain -- Implement various "age of" and other date-related templates. local mtext = { -- Message and other text that should be localized. -- Also need to localize text in table names in function dateDifference. ['mt-bad-param1'] = 'Invalid parameter $1', ['mt-bad-param2'] = 'Parameter $1=$2 is invalid', ['mt-bad-show'] = 'Parameter show=$1 is not supported here', ['mt-cannot-add'] = 'Cannot add "$1"', ['mt-conflicting-show'] = 'Parameter show=$1 conflicts with round=$2', ['mt-date-wrong-order'] = 'The second date must be later in time than the first date', ['mt-dd-future'] = 'Death date (first date) must not be in the future', ['mt-dd-wrong-order'] = 'Death date (first date) must be later in time than the birth date (second date)', ['mt-invalid-bd-age'] = 'Invalid birth date for calculating age', ['mt-invalid-dates-age'] = 'Invalid dates for calculating age', ['mt-invalid-end'] = 'Invalid end date in second parameter', ['mt-invalid-start'] = 'Invalid start date in first parameter', ['mt-need-jdn'] = 'Need valid Julian date number', ['mt-need-valid-bd'] = 'Need valid birth date: year, month, day', ['mt-need-valid-bd2'] = 'Need valid birth date (second date): year, month, day', ['mt-need-valid-date'] = 'Need valid date', ['mt-need-valid-dd'] = 'Need valid death date (first date): year, month, day', ['mt-need-valid-ymd'] = 'Need valid year, month, day', ['mt-need-valid-ymd-current'] = 'Need valid year|month|day or "currentdate"', ['mt-need-valid-ymd2'] = 'Second date should be year, month, day', ['mt-template-bad-name'] = 'The specified template name is not valid', ['mt-template-x'] = 'The template invoking this must have "|template=x" where x is the wanted operation', ['txt-and'] = ' and ', ['txt-or'] = '&nbsp;or ', ['txt-category'] = 'Category:Age error', ['txt-comma-and'] = ', and ', ['txt-error'] = 'Error: ', ['txt-format-default'] = 'mf', -- 'df' (day first = dmy) or 'mf' (month first = mdy) ['txt-module-convertnumeric'] = 'Module:ConvertNumeric', ['txt-module-date'] = 'Module:Date', ['txt-sandbox'] = 'sandbox', ['txt-bda'] = '<span style="display:none"> (<span class="bday">$1</span>) </span>$2<span class="noprint ForceAgeToShow"> (age&nbsp;$3)</span>', ['txt-dda'] = '$2<span style="display:none">($1)</span> (aged&nbsp;$3)', ['txt-bda-disp'] = 'disp_raw', -- disp_raw → age is a number only; disp_age → age is a number and unit (normally years but months or days if very young) ['txt-dda-disp'] = 'disp_raw', ['txt-dmy'] = '%-d %B %-Y', ['txt-mdy'] = '%B %-d, %-Y', } local isWarning = { ['mt-bad-param1'] = true, } local translate, from_en, to_en, isZero if translate then -- Functions to translate from en to local language and reverse go here. -- See example at [[:bn:Module:বয়স]]. else from_en = function (text) return text end isZero = function (text) return tonumber(text) == 0 end end local _Date, _currentDate local function getExports(frame) -- Return objects exported from the date module or its sandbox. if not _Date then local sandbox = frame:getTitle():find(mtext['txt-sandbox'], 1, true) and ('/' .. mtext['txt-sandbox']) or '' local datemod = require(mtext['txt-module-date'] .. sandbox) local realDate = datemod._Date _currentDate = datemod._current if to_en then _Date = function (...) local args = {} for i, v in ipairs({...}) do args[i] = to_en(v) end return realDate(unpack(args)) end else _Date = realDate end end return _Date, _currentDate end local Collection -- a table to hold items Collection = { add = function (self, item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end, join = function (self, sep) return table.concat(self, sep) end, remove = function (self, pos) if self.n > 0 and (pos == nil or (0 < pos and pos <= self.n)) then self.n = self.n - 1 return table.remove(self, pos) end end, sort = function (self, comp) table.sort(self, comp) end, new = function () return setmetatable({n = 0}, Collection) end } Collection.__index = Collection local function stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function dateFormat(args) -- Return string for wanted date format. local default = mtext['txt-format-default'] local other = default == 'df' and 'mf' or 'df' local wanted = stripToNil(args[other]) and other or default return wanted == 'df' and mtext['txt-dmy'] or mtext['txt-mdy'] end local function substituteParameters(text, ...) -- Return text after substituting any given parameters for $1, $2, etc. return mw.message.newRawMessage(text, ...):plain() end local function yes(parameter) -- Return true if parameter should be interpreted as "yes". -- Do not want to accept mixed upper/lowercase unless done by current templates. -- Need to accept "on" because "round=on" is wanted. return ({ y = true, yes = true, on = true })[parameter] end local function message(msg, ...) -- Return formatted message text for an error or warning. local function getText(msg) return mtext[msg] or error('Bug: message "' .. tostring(msg) .. '" not defined') end local categories = { error = mtext['txt-category'], warning = mtext['txt-category'], } local a, b, k, category local text = substituteParameters(getText(msg), ...) if isWarning[msg] then a = '<sup>[<i>' b = '</i>]</sup>' k = 'warning' else a = '<strong class="error">' .. getText('txt-error') b = '</strong>' k = 'error' end if mw.title.getCurrentTitle():inNamespaces(0) then -- Category only in namespaces: 0=article. category = '[[' .. categories[k] .. ']]' end return a .. mw.text.nowiki(text) .. b .. (category or '') end local function formatNumber(number) -- Return the given number formatted with commas as group separators, -- given that the number is an integer. local numstr = tostring(number) local length = #numstr local places = Collection.new() local pos = 0 repeat places:add(pos) pos = pos + 3 until pos >= length places:add(length) local groups = Collection.new() for i = places.n, 2, -1 do local p1 = length - places[i] + 1 local p2 = length - places[i - 1] groups:add(numstr:sub(p1, p2)) end return groups:join(',') end local function spellNumber(number, options, i) -- Return result of spelling number, or -- return number (as a string) if cannot spell it. -- i == 1 for the first number which can optionally start with an uppercase letter. number = tostring(number) return require(mtext['txt-module-convertnumeric']).spell_number( number, nil, -- fraction numerator nil, -- fraction denominator i == 1 and options.upper, -- true: 'One' instead of 'one' not options.us, -- true: use 'and' between tens/ones etc options.adj, -- true: hyphenated options.ordinal -- true: 'first' instead of 'one' ) or number end local function makeExtra(args, flagCurrent) -- Return extra text that will be inserted before the visible result -- but after any sort key. local extra = args.prefix or '' if mw.ustring.len(extra) > 1 then -- Parameter "~" gives "~3" whereas "over" gives "over 3". if extra:sub(-6, -1) ~= '&nbsp;' then extra = extra .. ' ' end end if flagCurrent then extra = '<span class="currentage"></span>' .. extra end return extra end local function makeSort(value, sortable) -- Return a sort key if requested. -- Assume value is a valid number which has not overflowed. if sortable == 'sortable_table' or sortable == 'sortable_on' or sortable == 'sortable_debug' then local sortKey if value == 0 then sortKey = '5000000000000000000' else local mag = math.floor(math.log10(math.abs(value)) + 1e-14) if value > 0 then sortKey = 7000 + mag else sortKey = 2999 - mag value = value + 10^(mag+1) end sortKey = string.format('%d', sortKey) .. string.format('%015.0f', math.floor(value * 10^(14-mag))) end local result if sortable == 'sortable_table' then result = 'data-sort-value="_SORTKEY_"|' elseif sortable == 'sortable_debug' then result = '<span data-sort-value="_SORTKEY_♠"><span style="border:1px solid">_SORTKEY_♠</span></span>' else result = '<span data-sort-value="_SORTKEY_♠"></span>' end return (result:gsub('_SORTKEY_', sortKey)) end end local translateParameters = { abbr = { off = 'abbr_off', on = 'abbr_on', }, disp = { age = 'disp_age', raw = 'disp_raw', }, format = { raw = 'format_raw', commas = 'format_commas', }, round = { on = 'on', yes = 'on', months = 'ym', weeks = 'ymw', days = 'ymd', hours = 'ymdh', }, sep = { comma = 'sep_comma', [','] = 'sep_comma', serialcomma = 'sep_serialcomma', space = 'sep_space', }, show = { hide = { id = 'hide' }, y = { 'y', id = 'y' }, ym = { 'y', 'm', id = 'ym' }, ymd = { 'y', 'm', 'd', id = 'ymd' }, ymw = { 'y', 'm', 'w', id = 'ymw' }, ymwd = { 'y', 'm', 'w', 'd', id = 'ymwd' }, yd = { 'y', 'd', id = 'yd', keepZero = true }, m = { 'm', id = 'm' }, md = { 'm', 'd', id = 'md' }, w = { 'w', id = 'w' }, wd = { 'w', 'd', id = 'wd' }, h = { 'H', id = 'h' }, hm = { 'H', 'M', id = 'hm' }, hms = { 'H', 'M', 'S', id = 'hms' }, M = { 'M', id = 'M' }, s = { 'S', id = 's' }, d = { 'd', id = 'd' }, dh = { 'd', 'H', id = 'dh' }, dhm = { 'd', 'H', 'M', id = 'dhm' }, dhms = { 'd', 'H', 'M', 'S', id = 'dhms' }, ymdh = { 'y', 'm', 'd', 'H', id = 'ymdh' }, ymdhm = { 'y', 'm', 'd', 'H', 'M', id = 'ymdhm' }, ymwdh = { 'y', 'm', 'w', 'd', 'H', id = 'ymwdh' }, ymwdhm = { 'y', 'm', 'w', 'd', 'H', 'M', id = 'ymwdhm' }, }, sortable = { off = false, on = 'sortable_on', table = 'sortable_table', debug = 'sortable_debug', }, } local spellOptions = { cardinal = {}, Cardinal = { upper = true }, cardinal_us = { us = true }, Cardinal_us = { us = true, upper = true }, ordinal = { ordinal = true }, Ordinal = { ordinal = true, upper = true }, ordinal_us = { ordinal = true, us = true }, Ordinal_us = { ordinal = true, us = true, upper = true }, } local function dateExtract(frame) -- Return part of a date after performing an optional operation. local Date = getExports(frame) local args = frame:getParent().args local parms = {} for i, v in ipairs(args) do parms[i] = v end if yes(args.fix) then table.insert(parms, 'fix') end if yes(args.partial) then table.insert(parms, 'partial') end local show = stripToNil(args.show) or 'dmy' local date = Date(unpack(parms)) if not date then if show == 'format' then return 'error' end return message('mt-need-valid-date') end local add = stripToNil(args.add) if add then for item in add:gmatch('%S+') do date = date + item if not date then return message('mt-cannot-add', item) end end end local sortKey, result local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date.partial and date.partial.first or date).jdz sortKey = makeSort(value, sortable) end if show ~= 'hide' then result = date[show] if result == nil then result = from_en(date:text(show)) elseif type(result) == 'boolean' then result = result and '1' or '0' else result = from_en(tostring(result)) end end return (sortKey or '') .. makeExtra(args) .. (result or '') end local function rangeJoin(range) -- Return text to be used between a range of ages. return range == 'dash' and '–' or mtext['txt-or'] end local function makeText(values, components, names, options, noUpper) -- Return wikitext representing an age or duration. local text = Collection.new() local count = #values local sep = names.sep or '' for i, v in ipairs(values) do -- v is a number (say 4 for 4 years), or a table ({4,5} for 4 or 5 years). local islist = type(v) == 'table' if (islist or v > 0) or (text.n == 0 and i == count) or (text.n > 0 and components.keepZero) then local fmt, vstr if options.spell then fmt = function(number) return spellNumber(number, options.spell, noUpper or i) end elseif i == 1 and options.format == 'format_commas' then -- Numbers after the first should be small and not need formatting. fmt = formatNumber else fmt = tostring end if islist then vstr = fmt(v[1]) .. rangeJoin(options.range) noUpper = true vstr = vstr .. fmt(v[2]) else vstr = fmt(v) end local name = names[components[i]] if name then if type(name) == 'table' then name = mw.getContentLanguage():plural(islist and v[2] or v, name) end text:add(vstr .. sep .. name) else text:add(vstr) end end end local first, last if options.join == 'sep_space' then first = ' ' last = ' ' elseif options.join == 'sep_comma' then first = ', ' last = ', ' elseif options.join == 'sep_serialcomma' and text.n > 2 then first = ', ' last = mtext['txt-comma-and'] else first = ', ' last = mtext['txt-and'] end for i, v in ipairs(text) do if i < text.n then text[i] = v .. (i + 1 < text.n and first or last) end end local sign = '' if options.isnegative then -- Do not display negative zero. if text.n > 1 or (text.n == 1 and text[1]:sub(1, 1) ~= '0' ) then if options.format == 'format_raw' then sign = '-' -- plain hyphen so result can be used in a calculation else sign = '−' -- Unicode U+2212 MINUS SIGN end end end return (options.sortKey or '') .. (options.extra or '') .. sign .. text:join() .. (options.suffix or '') end local function dateDifference(parms) -- Return a formatted date difference using the given parameters -- which have been validated. local names = { -- Each name is: -- * a string if no plural form of the name is used; or -- * a table of strings, one of which is selected using the rules at -- https://translatewiki.net/wiki/Plural/Mediawiki_plural_rules abbr_off = { sep = '&nbsp;', y = {'year', 'years'}, m = {'month', 'months'}, w = {'week', 'weeks'}, d = {'day', 'days'}, H = {'hour', 'hours'}, M = {'minute', 'minutes'}, S = {'second', 'seconds'}, }, abbr_on = { y = 'y', m = 'm', w = 'w', d = 'd', H = 'h', M = 'm', S = 's', }, abbr_infant = { -- for {{age for infant}} sep = '&nbsp;', y = {'yr', 'yrs'}, m = {'mo', 'mos'}, w = {'wk', 'wks'}, d = {'day', 'days'}, H = {'hr', 'hrs'}, M = {'min', 'mins'}, S = {'sec', 'secs'}, }, abbr_raw = {}, } local diff = parms.diff -- must be a valid date difference local show = parms.show -- may be nil; default is set below local abbr = parms.abbr or 'abbr_off' local defaultJoin if abbr ~= 'abbr_off' then defaultJoin = 'sep_space' end if not show then show = 'ymd' if parms.disp == 'disp_age' then if diff.years < 3 then defaultJoin = 'sep_space' if diff.years >= 1 then show = 'ym' else show = 'md' end else show = 'y' end end end if type(show) ~= 'table' then show = translateParameters.show[show] end if parms.disp == 'disp_raw' then defaultJoin = 'sep_space' abbr = 'abbr_raw' elseif parms.wantSc then defaultJoin = 'sep_serialcomma' end local diffOptions = { round = parms.round, duration = parms.wantDuration, range = parms.range and true or nil, } local sortKey if parms.sortable then local value = diff.age_days + (parms.wantDuration and 1 or 0) -- days and fraction of a day if diff.isnegative then value = -value end sortKey = makeSort(value, parms.sortable) end local textOptions = { extra = parms.extra, format = parms.format, join = parms.sep or defaultJoin, isnegative = diff.isnegative, range = parms.range, sortKey = sortKey, spell = parms.spell, suffix = parms.suffix, -- not currently used } if show.id == 'hide' then return sortKey or '' end local values = { diff:age(show.id, diffOptions) } if values[1] then return makeText(values, show, names[abbr], textOptions) end if diff.partial then -- Handle a more complex range such as -- {{age_yd|20 Dec 2001|2003|range=yes}} → 1 year, 12 days or 2 years, 11 days local opt = { format = textOptions.format, join = textOptions.join, isnegative = textOptions.isnegative, spell = textOptions.spell, } return (textOptions.sortKey or '') .. makeText({ diff.partial.mindiff:age(show.id, diffOptions) }, show, names[abbr], opt) .. rangeJoin(textOptions.range) .. makeText({ diff.partial.maxdiff:age(show.id, diffOptions) }, show, names[abbr], opt, true) .. (textOptions.suffix or '') end return message('mt-bad-show', show.id) end local function getDates(frame, getopt) -- Parse template parameters and return one of: -- * date (a date table, if single) -- * date1, date2 (two date tables, if not single) -- * text (a string error message) -- A missing date is optionally replaced with the current date. -- If wantMixture is true, a missing date component is replaced -- from the current date, so can get a bizarre mixture of -- specified/current y/m/d as has been done by some "age" templates. -- Some results may be placed in table getopt. local Date, currentDate = getExports(frame) getopt = getopt or {} local function flagCurrent(text) -- This allows the calling template to detect if the current date has been used, -- that is, whether both dates have been entered in a template expecting two. -- For example, an infobox may want the age when an event occurred, not the current age. -- Don't bother detecting if wantMixture is used because not needed and it is a poor option. if not text then if getopt.noMissing then return nil -- this gives a nil date which gives an error end text = 'currentdate' if getopt.flag == 'usesCurrent' then getopt.usesCurrent = true end end return text end local args = frame:getParent().args local fields = {} local isNamed = args.year or args.year1 or args.year2 or args.month or args.month1 or args.month2 or args.day or args.day1 or args.day2 if isNamed then fields[1] = args.year1 or args.year fields[2] = args.month1 or args.month fields[3] = args.day1 or args.day fields[4] = args.year2 fields[5] = args.month2 fields[6] = args.day2 else for i = 1, 6 do fields[i] = args[i] end end local imax = 0 for i = 1, 6 do fields[i] = stripToNil(fields[i]) if fields[i] then imax = i end if getopt.omitZero and i % 3 ~= 1 then -- omit zero months and days as unknown values but keep year 0 which is 1 BCE if isZero(fields[i]) then fields[i] = nil getopt.partial = true end end end local fix = getopt.fix and 'fix' or '' local partialText = getopt.partial and 'partial' or '' local dates = {} if isNamed or imax >= 3 then local nrDates = getopt.single and 1 or 2 if getopt.wantMixture then -- Cannot be partial since empty fields are set from current. local components = { 'year', 'month', 'day' } for i = 1, nrDates * 3 do fields[i] = fields[i] or currentDate[components[i > 3 and i - 3 or i]] end for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (m == 2 or m == '2') and (d == 29 or d == '29') then -- Workaround error with following which attempt to use invalid date 2001-02-29. -- {{age_ymwd|year1=2001|year2=2004|month2=2|day2=29}} -- {{age_ymwd|year1=2001|month1=2|year2=2004|month2=1|day2=29}} -- TODO Get rid of wantMixture because even this ugly code does not handle -- 'Feb' or 'February' or 'feb' or 'february'. if not ((y % 4 == 0 and y % 100 ~= 0) or y % 400 == 0) then d = 28 end end dates[i] = Date(y, m, d) end else -- If partial dates are allowed, accept -- year only, or -- year and month only -- Do not accept year and day without a month because that makes no sense -- (and because, for example, Date('partial', 2001, nil, 12) sets day = nil, not 12). for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (getopt.partial and y and (m or not d)) or (y and m and d) then dates[i] = Date(fix, partialText, y, m, d) elseif not y and not m and not d then dates[i] = Date(flagCurrent()) end end end else getopt.textdates = true -- have parsed each date from a single text field dates[1] = Date(fix, partialText, flagCurrent(fields[1])) if not getopt.single then dates[2] = Date(fix, partialText, flagCurrent(fields[2])) end end if not dates[1] then return message(getopt.missing1 or 'mt-need-valid-ymd') end if getopt.single then return dates[1] end if not dates[2] then return message(getopt.missing2 or 'mt-need-valid-ymd2') end return dates[1], dates[2] end local function ageGeneric(frame) -- Return the result required by the specified template. -- Can use sortable=x where x = on/table/off/debug in any supported template. -- Some templates default to sortable=on but can be overridden. local name = frame.args.template if not name then return message('mt-template-x') end local args = frame:getParent().args local specs = { age_days = { -- {{age in days}} show = 'd', disp = 'disp_raw', }, age_days_nts = { -- {{age in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', }, duration_days = { -- {{duration in days}} show = 'd', disp = 'disp_raw', duration = true, }, duration_days_nts = { -- {{duration in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', duration = true, }, age_full_years = { -- {{age}} show = 'y', abbr = 'abbr_raw', flag = 'usesCurrent', omitZero = true, range = 'dash', }, age_full_years_nts = { -- {{age nts}} show = 'y', abbr = 'abbr_raw', format = 'format_commas', sortable = 'on', }, age_in_years = { -- {{age in years}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', }, age_in_years_nts = { -- {{age in years nts}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', format = 'format_commas', sortable = 'on', }, age_infant = { -- {{age for infant}} -- Do not set show because special processing is done later. abbr = yes(args.abbr) and 'abbr_infant' or 'abbr_off', disp = 'disp_age', sep = 'sep_space', sortable = 'on', }, age_m = { -- {{age in months}} show = 'm', disp = 'disp_raw', }, age_w = { -- {{age in weeks}} show = 'w', disp = 'disp_raw', }, age_wd = { -- {{age in weeks and days}} show = 'wd', }, age_yd = { -- {{age in years and days}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, }, age_yd_nts = { -- {{age in years and days nts}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, sortable = 'on', }, age_ym = { -- {{age in years and months}} show = 'ym', sep = 'sep_comma', }, age_ymd = { -- {{age in years, months and days}} show = 'ymd', range = true, }, age_ymwd = { -- {{age in years, months, weeks and days}} show = 'ymwd', wantMixture = true, }, } local spec = specs[name] if not spec then return message('mt-template-bad-name') end if name == 'age_days' then local su = stripToNil(args['show unit']) if su then if su == 'abbr' or su == 'full' then spec.disp = nil spec.abbr = su == 'abbr' and 'abbr_on' or nil end end end local partial, autofill local range = stripToNil(args.range) or spec.range if range then -- Suppose partial dates are used and age could be 11 or 12 years. -- "|range=" (empty value) has no effect (spec is used). -- "|range=yes" or spec.range == true sets range = true (gives "11 or 12") -- "|range=dash" or spec.range == 'dash' sets range = 'dash' (gives "11–12"). -- "|range=no" or spec.range == 'no' sets range = nil and fills each date in the diff (gives "12"). -- ("on" is equivalent to "yes", and "off" is equivalent to "no"). -- "|range=OTHER" sets range = nil and rejects partial dates. range = ({ dash = 'dash', off = 'no', no = 'no', [true] = true })[range] or yes(range) if range then partial = true -- accept partial dates with a possible age range for the result if range == 'no' then autofill = true -- missing month/day in first or second date are filled from other date or 1 range = nil end end end local getopt = { fix = yes(args.fix), flag = stripToNil(args.flag) or spec.flag, omitZero = spec.omitZero, partial = partial, wantMixture = spec.wantMixture, } local date1, date2 = getDates(frame, getopt) if type(date1) == 'string' then return date1 end local format = stripToNil(args.format) local spell = spellOptions[format] if format then format = 'format_' .. format elseif name == 'age_days' and getopt.textdates then format = 'format_commas' end local parms = { diff = date2:subtract(date1, { fill = autofill }), wantDuration = spec.duration or yes(args.duration), range = range, wantSc = yes(args.sc), show = args.show == 'hide' and 'hide' or spec.show, abbr = spec.abbr, disp = spec.disp, extra = makeExtra(args, getopt.usesCurrent and format ~= 'format_raw'), format = format or spec.format, round = yes(args.round), sep = spec.sep, sortable = translateParameters.sortable[args.sortable or spec.sortable], spell = spell, } if (spec.negative or frame.args.negative) == 'error' and parms.diff.isnegative then return message('mt-date-wrong-order') end return from_en(dateDifference(parms)) end local function isFake(args) -- Some templates have TemplateData with an auto value like "{{Birth date and age|YYYY|MM|DD}}". -- Return true if that appears to be the case so the caller can output nothing rather than an error. return args[1] == 'YYYY' end local function bda(frame) -- Implement [[Template:Birth date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-bd', noMissing = true, single = true, } local date = getDates(frame, options) if type(date) == 'string' then return date -- error text end local Date = getExports(frame) local diff = Date('currentdate') - date if diff.isnegative or diff.years > 150 then return message('mt-invalid-bd-age') end local disp = mtext['txt-bda-disp'] local show = 'y' if diff.years < 2 then disp = 'disp_age' if diff.years == 0 and diff.months == 0 then show = 'd' else show = 'm' end end local result = substituteParameters( mtext['txt-bda'], date:text('%-Y-%m-%d'), from_en(date:text(dateFormat(args))), from_en(dateDifference({ diff = diff, show = show, abbr = 'abbr_off', disp = disp, sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, day = true, day1 = true, month = true, month1 = true, year = true, year1 = true, } local invalid local imax = options.textdates and 1 or 3 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dda(frame) -- Implement [[Template:Death date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-dd', missing2 = 'mt-need-valid-bd2', noMissing = true, partial = true, } local date1, date2 = getDates(frame, options) if type(date1) == 'string' then return date1 end local diff = date1 - date2 if diff.isnegative then return message('mt-dd-wrong-order') end local Date = getExports(frame) local today = Date('currentdate') + 1 -- one day in future allows for timezones if date1 > today then return message('mt-dd-future') end local years if diff.partial then years = diff.partial.years years = type(years) == 'table' and years[2] or years else years = diff.years end if years > 150 then return message('mt-invalid-dates-age') end local fmt_date, fmt_ymd if date1.day then -- y, m, d known fmt_date = dateFormat(args) fmt_ymd = '%-Y-%m-%d' elseif date1.month then -- y, m known; d unknown fmt_date = '%B %-Y' fmt_ymd = '%-Y-%m-00' else -- y known; m, d unknown fmt_date = '%-Y' fmt_ymd = '%-Y-00-00' end local sortKey local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date1.partial and date1.partial.first or date1).jdz sortKey = makeSort(value, sortable) end local result = (sortKey or '') .. substituteParameters( mtext['txt-dda'], date1:text(fmt_ymd), from_en(date1:text(fmt_date)), from_en(dateDifference({ diff = diff, show = 'y', abbr = 'abbr_off', disp = mtext['txt-dda-disp'], range = 'dash', sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, } local invalid local imax = options.textdates and 2 or 6 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dateToGsd(frame) -- Implement [[Template:Gregorian serial date]]. -- Return Gregorian serial date of the given date, or the current date. -- The returned value is negative for dates before 1 January 1 AD -- despite the fact that GSD is not defined for such dates. local date = getDates(frame, { wantMixture=true, single=true }) if type(date) == 'string' then return date end return tostring(date.gsd) end local function jdToDate(frame) -- Return formatted date from a Julian date. -- The result includes a time if the input includes a fraction. -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date('juliandate', args[1], args[2]) if date then return from_en(date:text()) end return message('mt-need-jdn') end local function dateToJd(frame) -- Return Julian date (a number) from a date which may include a time, -- or the current date ('currentdate') or current date and time ('currentdatetime'). -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date(args[1], args[2], args[3], args[4], args[5], args[6], args[7]) if date then return tostring(date.jd) end return message('mt-need-valid-ymd-current') end local function timeInterval(frame) -- Implement [[Template:Time interval]]. -- There are two positional arguments: date1, date2. -- The default for each is the current date and time. -- Result is date2 - date1 formatted. local Date = getExports(frame) local args = frame:getParent().args local parms = { extra = makeExtra(args), wantDuration = yes(args.duration), range = yes(args.range) or (args.range == 'dash' and 'dash' or nil), wantSc = yes(args.sc), } local fix = yes(args.fix) and 'fix' or '' local date1 = Date(fix, 'partial', stripToNil(args[1]) or 'currentdatetime') if not date1 then return message('mt-invalid-start') end local date2 = Date(fix, 'partial', stripToNil(args[2]) or 'currentdatetime') if not date2 then return message('mt-invalid-end') end parms.diff = date2 - date1 for argname, translate in pairs(translateParameters) do local parm = stripToNil(args[argname]) if parm then parm = translate[parm] if parm == nil then -- test for nil because false is a valid setting return message('mt-bad-param2', argname, args[argname]) end parms[argname] = parm end end if parms.round then local round = parms.round local show = parms.show if round ~= 'on' then if show then if show.id ~= round then return message('mt-conflicting-show', args.show, args.round) end else parms.show = translateParameters.show[round] end end parms.round = true end return from_en(dateDifference(parms)) end return { age_generic = ageGeneric, -- can emulate several age templates birth_date_and_age = bda, -- Template:Birth_date_and_age death_date_and_age = dda, -- Template:Death_date_and_age gsd = dateToGsd, -- Template:Gregorian_serial_date extract = dateExtract, -- Template:Extract jd_to_date = jdToDate, -- Template:? JULIANDAY = dateToJd, -- Template:JULIANDAY time_interval = timeInterval, -- Template:Time_interval } 6ca69a24c5aa2fa9bbb155bb2a123314feea53e0 Module:Documentation 828 8 1050 2024-01-07T08:09:04Z Infobox-person>DannyS712 0 remove unneeded return variables (if this breaks anything feel free to revert without discussing with me first) Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c 12 2024-03-15T12:39:59Z Motzoid India 2 Created page with "-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purpos..." Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- env.printTitle - the print version of the template, located at the /Print subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.printTitle() --[[ -- Title object for the /Print subpage. -- Messages: -- 'print-subpage' --> 'Print' --]] return env.templateTitle:subPageTitle(message('print-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Bharatpedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Bharatpedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 6 then -- File namespace preload = message('file-docpage-preload') elseif subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. if printBlurb then text = text .. '<br />' .. printBlurb end end end local box = mw.html.create('div') -- 'documentation-metadata' box:addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Bharatpedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Bharatpedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end function p.makePrintBlurb(args, env) --[=[ -- Generates the blurb displayed when there is a print version of the template available. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'print-link-display' --> '/Print' -- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' -- .. ' of this template exists at $1.' -- .. ' If you make a change to this template, please update the print version as well.' -- 'display-print-category' --> true -- 'print-category' --> 'Templates with print versions' --]=] local printTitle = env.printTitle if not printTitle then return nil end local ret if printTitle.exists then local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display')) ret = message('print-blurb', {printLink}) local displayPrintCategory = message('display-print-category', nil, 'boolean') if displayPrintCategory then ret = ret .. makeCategoryLink(message('print-category')) end end return ret end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 10dd02b48fdee56bb136439c7deb039771634974 Template:Marriage/doc 10 564 1148 2024-01-07T22:47:40Z Infobox-person>Neveselbert 0 Section heading change: Examples and Usage Notes → Examples and {{subst:lc:Usage Notes}} using a [[User:The Evil IP address/hdedit|script]] wikitext text/x-wiki {{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{esoteric}} {{high-use}} {{Lua|Module:Check for unknown parameters|Module:Parameter validation}} {{Uses Wikidata|P21|P570}} {{Uses TemplateStyles|Template:Marriage/styles.css}} ==Usage== {{TemplateData}} <templatedata>{ "format": "inline", "description": "Intended for use in Infoboxes, specifically {{Infobox person}} and templates calling Infobox person.\n\n{{Marriage}} takes up to three unnamed parameters (name, start date, end date) plus an optional named parameter \"end=\" to provide the reason for the end of the marriage.", "params": { "1": { "label": "Spouse's name", "description": "Name of the person to whom the subject married. May be omitted, typically for remarriages to the same spouse.", "type": "string", "suggested": true }, "2": { "label": "Date married", "description": "Date the marriage began.", "type": "date", "suggested": true }, "3": { "label": "Date ended", "description": "Date the marriage was dissolved or the spouse of the article's subject died.", "type": "date", "required": false }, "end": { "label": "Reason marriage ended", "description": "Reason for marriage's end. Suggested reasons are automatically abbreviated. If the marriage ended due to death of article's subject, do not provide a reason.", "type": "string", "required": false, "aliases": [ "reason" ], "suggestedvalues": [ "died", "divorced", "separated", "annulled" ] } } }</templatedata> ===Examples and usage notes=== {{Infobox person|name={{tl|Infobox person}} |spouse = {{Plainlist| * {{marriage |John Smith |1 January 1895 |December 31, 1905}} * {{marriage |John Doe |1885 |July 27, 1888 |end=d.}} * {{marriage |Jane Doe |2002}} * {{marriage |John Q. Public |2002|2010}} * {{marriage |John Q. Citizen |2002|2010|end=div}} * {{marriage |<!--John Q. Citizen-->|2012}} * {{marriage |John Q. Taxpayer |2002|end=div}} * {{marriage |Joe Blow|<!--unknown-->|2010|end=div}} * {{marriage |Joe Bloggs|<!--unknown-->|2010}} * {{marriage |Joe Sixpack|<!--unknown-->|2010|end=<!--uncertain-->}} * {{marriage |Joe Schmo |end=div}} * {{marriage |Juan Perez |2010|reason=<!--earliest-->}} }} }} Infoboxes already reduce text size to 88%, and [[MOS:FONTSIZE]] sets a lower limit for text size at 85% of the normal page font size, so it is not appropriate to use font size reduction when this template is used in an infobox. The example here is produced by: <syntaxhighlight style="font-size:small;" lang="wikitext"> {{Infobox person |spouse = {{Plainlist| * {{marriage |John Smith |1 January 1895 |December 31, 1905}} * {{marriage |John Doe |1885 |July 27, 1888 |end=d.}} * {{marriage |Jane Doe |2002}} * {{marriage |John Q. Public |2002|2010}} * {{marriage |John Q. Citizen |2002|2010|end=div}} * {{marriage |<!--John Q. Citizen-->|2012}} * {{marriage |John Q. Taxpayer |2002|end=div}} * {{marriage |Joe Blow|<!--unknown-->|2010|end=div}} * {{marriage |Joe Bloggs|<!--unknown-->|2010}} * {{marriage |Joe Sixpack|<!--unknown-->|2010|end=<!--uncertain-->}} * {{marriage |Joe Schmo |end=div}} * {{marriage |Juan Perez |2010|reason=<!--earliest-->}} }} }} </syntaxhighlight> * None of the parameters are required on their own, but if a template is missing all three of start date, end date, and reason, an error message will be displayed. * Use of the first two parameters with {{para|end}} ({{para|reason}}) will cause a line break between the name and the start date. * Use of {{dc|his death}} or {{dc|her death}} for this purpose has been deprecated ([[Template talk:Marriage/Archive 5#Use "(m. 1900)" and do not fill in an end date|see discussion]]). * If the marriage ended with the death of the article's subject, {{insource|"Omission per Template:Marriage instructions"|do {{em|not}} provide a date}}. * For either date parameter, only the year will be displayed; if a full date is provided, it is included via a tooltip; i.e., {{tla|Tooltip}}. {{qnote|Use of the values {{dcr|w}}, {{dcr|w.}}, {{dcr|wid}}, {{dcr|wid.}}, {{dcr|widow}}, or {{dcr|widowed}} is [[Template talk:Marriage/Archive 4#Who is widowed - topic or topic's spouse?|no longer supported]] and will display an error message.}} ==Tracking categories== * {{Category link with count|Marriage template errors}}{{sup|†}} * {{Category link with count|Pages using Marriage with duplicate parameters}} {{sup|‡}} * {{Category link with count|Pages using Marriage with unknown parameters}} {{sup|‡}} * {{Category link with count|Pages using Marriage with deprecated parameters}} {{sup|‡}} {{plainlist| * {{small|{{sup|†}} Populated by template logic; contains invalid/missing dates and unsupported parameters/values.}} * {{small|{{sup|‡}} Populated via [[Module:Parameter_validation|parameter validation]].}} }} <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Text-specific formatting and function templates‎]] [[Category:Marriage templates]] [[Category:Templates that add a tracking category|{{PAGENAME}}]] }}</includeonly> 1fe1e4bcd17bf071656dfe6c5472ae6ba6614e60 Module:List 828 13 850 2024-01-08T18:18:39Z Infobox-person>Pppery 0 Reverted edit by [[Special:Contribs/Pppery|Pppery]] ([[User talk:Pppery|talk]]) to last version by Izno Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a South Asian topics 0 653 1330 2024-01-09T03:38:26Z History of science and technology on the Indian subcontinent>GreekApple123 0 wikitext text/x-wiki {{Navbox | name = South Asian topics | state = {{{state<includeonly>|autocollapse</includeonly>}}} | title = [[South Asia|South Asian topics]] | image = [[File:South Asia (orthographic projection).svg|80px|link=South Asia|alt=]] | listclass = hlist | group1 = [[:Category:South Asian countries|Countries and regions]] | list1 = * [[Afghanistan]] * [[Bangladesh]] * [[Bhutan]] * [[India]] ** [[North India|North]] ** [[South India|South]] ** [[Northeast India|Northeast]] ** [[List of islands in India|Islands]] * [[Maldives]] * [[Nepal]] * [[Pakistan]] ** [[Punjab, Pakistan|Punjab]] * [[Sri Lanka]] * [[South Asia#Regions|South Asian regions]] ** [[Northwestern South Asia|Northwestern]] ** [[Northern South Asia|Northern]] ** [[Eastern South Asia|Eastern]] ** [[Southern South Asia|Southern]] * [[:Template:GeoSouthAsia |General geography]] | group2 = [[South Asian ethnic groups|Ethnic groups]] | list2 = * [[Andamanese peoples|Andamanese]] * [[Austroasiatic peoples of South Asia|Austroasiatic]] * [[South_Asian_ethnic_groups#Austronesian_people|Austronesian]] * [[Dravidian peoples|Dravidian]] * [[Indo-Aryan peoples|Indo-Aryan]] * [[South_Asian_ethnic_groups#Iranic_people|Iranic]] * [[South_Asian_ethnic_groups#Semitic_people|Semitic]] * [[Nuristani peoples|Nuristani]] * [[Turkic peoples|Turkic]] * Other groups ** [[Afro-Asians in South Asia|Afro-Asians]] ** [[South_Asian_ethnic_groups#Chinese|Chinese]] ** [[South_Asian_ethnic_groups#European_and_Eurasian_people|European and Eurasian]] * [[South Asian diaspora|Diaspora]] | group3 = [[Culture of South Asia|Culture]] | list3 = * [[:Category:South Asian architecture‎|Architecture‎]] * [[Indian art|Art]] * [[South Asian cinema|Cinema]] * [[South Asian cuisine|Cuisine]] * [[Greater India|Cultural sphere]] * [[Template:Clothing_in_South_Asia|Fashion]] * [[Languages of South Asia|Languages]] * [[South Asian literature|Literature]] * [[:Category:South_Asian_music|Music]] * [[:Category:South Asian mythology‎|Mythology]] * [[:Category:South Asian philosophy|Philosophy]] * [[Brahmic scripts|Scripts]] * [[:Category:Surnames of South Asian origin|Surnames]] | group4 = [[:Category:Environment of South Asia|Environment]] | list4 = * [[South Asian Monsoon|Monsoon]] * [[Climate change in South Asia|Climate change]] | group5 = [[Economy of South Asia|Economy]] and [[:Category:Politics of South Asia|Politics]] | list5 = * [[Human rights in South Asia]] * [[Religious nationalism]] ** [[Hindutva|Hindu]] ** [[Muslim nationalism in South Asia|Muslim]] ** [[Khalistan movement|Sikh]] * [[List_of_Asian_stock_exchanges#Southern_Asia|Stock exchanges]] * [[Caste#In South Asia|Caste system]] | group6 = [[History of South Asia|History]] | list6 = * [[:Category:Archaeology of South Asia|Archaeology]] ** [[:Category:Archaeological cultures of South Asia|Archaeological cultures]] * [[South Asian Bronze Age|Bronze Age]] * [[Vedic period|Iron Age]] * [[Middle kingdoms of India|Middle kingdoms]] * [[Medieval India|Medieval]] * [[India#Early_modern_India|Early modern]] * [[Colonial India|Colonial era]] * [[South Asia#Contemporary era|Modern era]] * [[:Category:Former countries in South Asia|Former countries]] | group7 = [[Religion in South Asia|Religion]] | list7 = * [[Dharmic religions|Dharmic]] ** [[Hinduism in South Asia|Hinduism]] ** [[Sikhism]] * [[Islam in South Asia|Islam]] * [[Religious discrimination|Religious persecution]] ** [[Freedom_of_religion_in_Bangladesh#Persecution|Bangladesh]] ** [[Religious_violence_in_India#Modern_India|India]] ** [[Religious_discrimination_in_Pakistan|Pakistan]] | group8 = [[Sport in South Asia|Sports]] | list8 = * [[Cricket at the South Asian Games|Cricket]] * [[South Asian Football Federation]] * [[South Asian Games]] * [[Traditional games of South Asia|Traditional games]] * [[Indian martial arts|South Asian martial arts]] | group9 = [[:Category:Education in South Asia|Education]] | list9 = * [[South Asian studies]] | group10 = Military | list10 = * [[Indo-Pakistani wars and conflicts|Indo-Pakistani conflicts]] * [[Sino-Indian border dispute]] * [[Afghanistan–Pakistan border skirmishes|Afghanistan–Pakistan skirmishes]] | group11 = [[History of science and technology in the Indian subcontinent|Science and technology]] | list11 = * [[Indian Institutes of Technology]] * [[List of Indian inventions and discoveries|Inventions and discoveries]] * [[History of science and technology in the Indian subcontinent|History]] * [[:Category:South_Asian_swords|Swords]] * [[:Category:South Asian traditional medicine|Traditional medicine]] }}<noinclude> {{collapsible option}} [[Category:Asia region templates]] [[Category:South Asia|*]] </noinclude> 0ca6f3a0765626bc94b208aa99c508a5b22d39bb Module:Effective protection level 828 446 906 2024-01-15T21:44:42Z Infobox-person>Pppery 0 Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p b6cb1e5589ec6575118f60841644cd65defa7174 Module:High-use 828 541 1102 2024-02-07T02:05:53Z Infobox-person>Pppery 0 Don't auto-categorize redirects Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise and not mw.title.getCurrentTitle().isRedirect then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e22649bbbdf0185575aade09174113873db5066a Module:Lang/data 828 391 788 2024-02-13T00:41:13Z Infobox-person>Trappist the monk 0 pny → cmn; Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['cmn'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; d521432b8bb206c7e58735aef9488a3b323502b5 Template:Clear 10 433 880 2024-02-13T14:32:36Z Infobox-person>Redrose64 0 pass class through wikitext text/x-wiki <div style="clear:{{{1|both}}};" class={{{class|}}}></div><noinclude> {{documentation}} </noinclude> 5b24b9fd5cc166a8c486e2422d5df465206ed39c SDcat 0 588 1200 2024-02-17T03:58:17Z History of science and technology on the Indian subcontinent>Pppery 0 Changed protection settings for "[[Template:SDcat]]": Per [[Template:Short description]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:SDcat |setCat}}</includeonly><noinclude> {{documentation}} </noinclude> 8c6e8783ddb0dc699d6fb60370db97b73725b9a6 Template:Delink 10 421 856 2024-02-17T04:47:19Z Infobox-person>Pppery 0 Changed protection settings for "[[Template:Delink]]": Dependency of fully-protected (and on [[WP:CASC]]) [[Template:Fix]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:delink|delink}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> ccf86b4255142fffb206ab8240f36ed22e029d6a Module:Delink 828 422 858 2024-02-17T04:47:33Z Infobox-person>Pppery 0 Changed protection settings for "[[Module:Delink]]": Dependency of fully-protected (and on [[WP:CASC]]) [[Template:Fix]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module de-links most wikitext. require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per [[Help:Pipe trick]]. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:match("%[%[.-:(.*)|%]%]") -- If there are no colons, grab all of the text apart from the square brackets and the pipe. else s = s:match("%[%[(.*)|%]%]") end -- Next up, brackets and commas. if s:match("%(.-%)$") then -- Brackets trump commas. s = s:match("(.-) ?%(.-%)$") elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. s = s:match("(.-),.*$") end return s end -- Return wikilink target |wikilinks=target local function getDelinkedTarget(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end return target_area end local function getDelinkedLabel(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end -- Check for categories, interwikis, and files. local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon. local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace if mw.language.isKnownLanguageTag(colon_prefix) or (ns and (ns.canonicalName == "File" or ns.canonicalName == "Category")) then return "" end -- Remove the colon if the link is using the [[Help:Colon trick]]. if result:match("%[%[:") then result = "[[" .. result:match("%[%[:(.*%]%])") end -- Deal with links using the [[Help:Pipe trick]]. if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then return delinkPipeTrick(result) end -- Find the display area of the wikilink if result:match("|") then -- Find if we're dealing with a piped link. result = result:match("^%[%[.-|(.+)%]%]") -- Remove new lines from the display of multiline piped links, -- where the pipe is before the first new line. result = result:gsub("\n", "") else result = result:match("^%[%[(.-)%]%]") end return result end local function delinkURL(s) -- Assume we have already delinked internal wikilinks, and that -- we have been passed some text between two square brackets [foo]. -- If the text contains a line break it is not formatted as a URL, regardless of other content. if s:match("\n") then return s end -- Check if the text has a valid URL prefix and at least one valid URL character. local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"} local url_prefix for _ ,v in ipairs(valid_url_prefixes) do if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then url_prefix = v break end end -- Get display text if not url_prefix then return s end s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket. s = s:match('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ). s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded, "%c") then return s end return s_decoded end local function delinkLinkClass(text, pattern, delinkFunction) if type(text) ~= "string" then error("Attempt to de-link non-string input.", 2) end if type(pattern) ~= "string" or mw.ustring.sub(pattern, 1, 1) ~= "^" then error('Invalid pattern detected. Patterns must begin with "^".', 2) end -- Iterate over the text string, and replace any matched text. using the -- delink function. We need to iterate character by character rather -- than just use gsub, otherwise nested links aren't detected properly. local result = "" while text ~= "" do -- Replace text using one iteration of gsub. text = mw.ustring.gsub(text, pattern, delinkFunction, 1) -- Append the left-most character to the result string. result = result .. mw.ustring.sub(text, 1, 1) text = mw.ustring.sub(text, 2, -1) end return result end function p._delink(args) local text = args[1] or "" if args.refs == "yes" then -- Remove any [[Help:Strip markers]] representing ref tags. In most situations -- this is not a good idea - only use it if you know what you are doing! text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "") end if args.comments ~= "no" then text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments. end if args.wikilinks ~= "no" and args.wikilinks ~= "target" then -- De-link wikilinks and return the label portion of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel) elseif args.wikilinks == "target" then -- De-link wikilinks and return the target portions of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget) end if args.urls ~= "no" then text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs. end if args.whitespace ~= "no" then -- Replace single new lines with a single space, but leave double new lines -- and new lines only containing spaces or tabs before a second new line. text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2") text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces. end return text end function p.delink(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._delink(getArgs(frame, {wrappers = 'Template:Delink'})) end return p 5b8e75ac750b5d3ed76cc4158aefcd1568a6a6fd Template:Plainlist 10 444 902 2024-02-17T04:49:57Z Infobox-person>Pppery 0 Changed protection settings for "[[Template:Plainlist]]": Used in [[Template:No article text]] - on [[WP:CASC]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Template:Endplainlist 10 518 1056 2024-02-17T04:52:14Z Infobox-person>Pppery 0 Protected "[[Template:Endplainlist]]": Oops ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Abbr 10 388 782 2024-02-17T05:01:01Z Infobox-person>Pppery 0 Changed protection settings for "[[Template:Abbr]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> 5fd53aa19ba927ce3eea9092a4fa31f881df0a6e Template:Hlist 10 15 834 2024-02-17T05:01:35Z Infobox-person>Pppery 0 Changed protection settings for "[[Template:Hlist]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Hlist 0 591 1206 2024-02-17T05:01:35Z History of science and technology on the Indian subcontinent>Pppery 0 Changed protection settings for "[[Template:Hlist]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Template:In string 10 493 1000 2024-02-17T05:14:55Z Infobox-person>Pppery 0 Changed protection settings for "[[Template:In string]]": Always cascade protected via main page, for consistency ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{{plain|{{{4|}}}}}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude> b980c10def03090ad85d76557485fb1be3a19aef Template:Sister project 10 475 964 2024-02-19T03:28:32Z Infobox-person>Pppery 0 Add wikifunctions per request wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | wikifunctions = Wikifunctions-logo.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> 9bab46e6907b835c6af71184149f8c81afa6f1b1 Sister project 0 617 1258 2024-02-19T03:28:32Z History of science and technology on the Indian subcontinent>Pppery 0 Add wikifunctions per request wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | wikifunctions = Wikifunctions-logo.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> 9bab46e6907b835c6af71184149f8c81afa6f1b1 Module:Protection banner/config 828 463 940 2024-03-01T12:45:46Z Infobox-person>SilverLocust 0 Fix for [[Template talk:Db-a1]] and similar template-protected non-template redirects being miscategorized into [[Category:Wikipedia fully protected pages]]. Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 65de905227752d0a0dae145e9ad8dbe1d0087016 Template:Person infobox header 10 562 1144 2024-03-03T12:43:19Z Infobox-person>DB1729 0 Category:People and person infobox templates wikitext text/x-wiki {{ombox|type=content|text=The design and content of biographical infoboxes must follow Wikipedia's [[Wikipedia:Verifiability|verifiability policy]], as well as [[Wikipedia:Manual of Style/Infoboxes|infobox]] and [[Wikipedia:Manual of Style/Biography|biographical style guideline]]. All content displayed in this template must adhere to the '''[[Wikipedia:Biographies of living persons|biographies of living persons]]''' policy if applicable. [[Wikipedia:Citing sources|Unsourced or poorly sourced]] contentious material '''must be removed immediately''' from the article and its infobox, especially if potentially [[Wikipedia:Libel|libellous]].}} <noinclude> {{documentation |content= {{no documentation}} [[Category:People and person infobox templates]] }} </noinclude> 8440915f7cf3c89062b5b67dc8a4c985774c3ae3 Module:Language/data/iana languages 828 392 790 2024-03-07T15:58:50Z Infobox-person>Trappist the monk 0 update to 2024-03-07 data; Scribunto text/plain -- File-Date: 2024-03-07 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["cls"] = {"Classical Sanskrit"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rrm"] = {"Moriori"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsn"] = {"Vedic Sanskrit"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } e2e99d5986905d81c9545501e430f3b244ecd166 Module:Language/data/iana scripts 828 393 792 2024-03-07T15:58:52Z Infobox-person>Trappist the monk 0 update to 2024-03-07 data; Scribunto text/plain -- File-Date: 2024-03-07 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } abd91245564d473fdb44e3bb808df6ab6bc40256 Module:Language/data/iana regions 828 394 794 2024-03-07T15:58:55Z Infobox-person>Trappist the monk 0 update to 2024-03-07 data; Scribunto text/plain -- File-Date: 2024-03-07 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 84f811ae4cc14650da1f682f26e93ef6785312ed Module:Language/data/iana variants 828 395 796 2024-03-07T15:58:58Z Infobox-person>Trappist the monk 0 update to 2024-03-07 data; Scribunto text/plain -- File-Date: 2024-03-07 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["anpezo"] = { ["descriptions"] = {"Anpezo standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fascia"] = { ["descriptions"] = {"Fascia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fodom"] = { ["descriptions"] = {"Fodom standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["gherd"] = { ["descriptions"] = {"Gherdëina standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["pehoeji"] = { ["descriptions"] = {"Hokkien Vernacular Romanization System", "Pe̍h-ōe-jī orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tailo"] = { ["descriptions"] = {"Taiwanese Hokkien Romanization System for Hokkien languages", "Tâi-lô orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valbadia"] = { ["descriptions"] = {"Val Badia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } 946471b19830483da16c76dbb9e1a7867ce11bdc Module:Language/data/iana suppressed scripts 828 396 798 2024-03-07T15:59:00Z Infobox-person>Trappist the monk 0 update to 2024-03-07 data; Scribunto text/plain -- File-Date: 2024-03-07 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } c6e43ac4caba75761efe732bbf8c47798c1e644f Icon 0 600 1224 2024-03-09T15:06:32Z History of science and technology on the Indian subcontinent>Plastikspork 0 Closing TfD as merge wikitext text/x-wiki {{#invoke:Icon|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> bd5b855953c5eec9d9c48400aa39315cb4218558 Module:Transclusion count/data/I 828 555 1130 2024-03-10T05:13:15Z Infobox-person>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["IAST"] = 6700, ["IBDB_name"] = 9200, ["ICD10"] = 4900, ["ICD9"] = 4400, ["ICS"] = 3000, ["IDN"] = 3500, ["IMDb_episode"] = 10000, ["IMDb_episodes"] = 2800, ["IMDb_name"] = 156000, ["IMDb_title"] = 194000, ["IMO_Number"] = 4100, ["IMSLP"] = 8400, ["INA"] = 2200, ["IND"] = 7700, ["INR"] = 6700, ["INRConvert"] = 5900, ["INRConvert/CurrentRate"] = 5800, ["INRConvert/USD"] = 5800, ["INRConvert/out"] = 5800, ["IOBDB_name"] = 2000, ["IP"] = 2700, ["IPA"] = 145000, ["IPA-de"] = 8300, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3900, ["IPA-pl"] = 4100, ["IPA-pt"] = 3300, ["IPA-sl"] = 6900, ["IPA-th"] = 3000, ["IPA_audio_link"] = 3600, ["IPA_link"] = 3800, ["IPAc-cmn"] = 2400, ["IPAc-en"] = 49000, ["IPAc-pl"] = 51000, ["IPC_athlete"] = 3300, ["IPSummary"] = 78000, ["IP_summary"] = 79000, ["IPtalk"] = 18000, ["IPuser"] = 7100, ["IPvandal"] = 2700, ["IRC"] = 7200, ["IRI"] = 2300, ["IRL"] = 5500, ["IRN"] = 3700, ["ISBN"] = 464000, ["ISBN?"] = 2200, ["ISBNT"] = 40000, ["ISBN_missing"] = 2700, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4600, ["ISL"] = 2200, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2800, ["ISO_3166_code"] = 503000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 8300, ["ISP"] = 4600, ["ISR"] = 4900, ["ISSN"] = 12000, ["ISSN_link"] = 31000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 18000, ["ITF"] = 6300, ["ITF_profile"] = 9100, ["ITIS"] = 4500, ["ITN_talk"] = 11000, ["ITN_talk/date"] = 11000, ["IUCN_banner"] = 15000, ["I_sup"] = 4800, ["Ice_hockey"] = 5500, ["Ice_hockey_stats"] = 19000, ["Icehockeystats"] = 12000, ["Icon"] = 588000, ["If"] = 283000, ["If_all"] = 6600, ["If_between"] = 3800, ["If_both"] = 133000, ["If_empty"] = 3760000, ["If_first_display_both"] = 73000, ["If_in_page"] = 12000, ["If_last_display_both"] = 31000, ["If_preview"] = 59000, ["If_then_show"] = 310000, ["Ifempty"] = 4000, ["Ifeq"] = 17000, ["Iferror_then_show"] = 3300, ["Ifexist_not_redirect"] = 1340000, ["Ifnotempty"] = 15000, ["Ifnumber"] = 39000, ["Ifsubst"] = 467000, ["Ih"] = 7600, ["Ill"] = 130000, ["Illm"] = 6500, ["Image_frame"] = 5100, ["Image_label"] = 4500, ["Image_label_begin"] = 3900, ["Image_label_end"] = 3800, ["Image_label_small"] = 2600, ["Image_needed"] = 4900, ["Image_other"] = 271000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 161000, ["Imbox"] = 925000, ["Imdb_name"] = 5300, ["Imdb_title"] = 3300, ["Import_style"] = 12000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 10600000, ["Improve_categories"] = 7800, ["Improve_documentation"] = 2800, ["In_class"] = 5600, ["In_lang"] = 362000, ["In_progress"] = 3300, ["In_string"] = 80000, ["In_title"] = 20000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 26000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 46000, ["Incumbent_pope"] = 4300, ["Indent"] = 4700, ["IndexFungorum"] = 2200, ["Indian_English"] = 4400, ["Indian_Rupee"] = 11000, ["Indian_railway_code"] = 3200, ["Inflation"] = 21000, ["Inflation-fn"] = 5500, ["Inflation-year"] = 4600, ["Inflation/IN/startyear"] = 5800, ["Inflation/UK"] = 4500, ["Inflation/UK/dataset"] = 4500, ["Inflation/UK/startyear"] = 4500, ["Inflation/US"] = 13000, ["Inflation/US-GDP"] = 2500, ["Inflation/US-GDP/dataset"] = 2500, ["Inflation/US-GDP/startyear"] = 2500, ["Inflation/US/dataset"] = 13000, ["Inflation/US/startyear"] = 13000, ["Inflation/fn"] = 6400, ["Inflation/year"] = 27000, ["Info"] = 7100, ["Infobox"] = 3260000, ["Infobox/Columns"] = 2500, ["Infobox/mobileviewfix.css"] = 148000, ["Infobox3cols"] = 17000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5200, ["Infobox_Aircraft_Type"] = 4600, ["Infobox_Athletics_Championships"] = 2800, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2100, ["Infobox_COA_wide"] = 3300, ["Infobox_Canada_electoral_district"] = 2500, ["Infobox_Canadian_Football_League_biography"] = 5700, ["Infobox_Canadian_Football_League_biography/position"] = 5600, ["Infobox_Chinese"] = 21000, ["Infobox_Chinese/Chinese"] = 2800, ["Infobox_Chinese/Footer"] = 8400, ["Infobox_Chinese/Header"] = 8400, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2600, ["Infobox_Gaelic_games_player"] = 5100, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2900, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2600, ["Infobox_Indian_constituency"] = 5200, ["Infobox_Indian_constituency/defaultdata"] = 5200, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_NASCAR_race_report"] = 2300, ["Infobox_NCAA_team_season"] = 17000, ["Infobox_NFL_biography"] = 29000, ["Infobox_NFL_player"] = 7500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 73000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4500, ["Infobox_Olympic_event"] = 7400, ["Infobox_Olympic_event/games_text"] = 7400, ["Infobox_Pan_American_Games_event"] = 2300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2000, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4500, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 19000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3800, ["Infobox_UK_place"] = 26000, ["Infobox_UK_place/NoDialCode"] = 8100, ["Infobox_UK_place/NoPostCode"] = 3300, ["Infobox_UK_place/area"] = 2600, ["Infobox_UK_place/dens"] = 2200, ["Infobox_UK_place/dist"] = 2800, ["Infobox_UK_place/local"] = 26000, ["Infobox_UK_place/styles.css"] = 26000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3900, ["Infobox_US_Supreme_Court_case/courts"] = 3900, ["Infobox_Wikipedia_user"] = 10000, ["Infobox_YouTube_personality"] = 2900, ["Infobox_YouTube_personality/styles.css"] = 2900, ["Infobox_academic"] = 15000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2400, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 163000, ["Infobox_album/color"] = 194000, ["Infobox_album/link"] = 163000, ["Infobox_anatomy"] = 4500, ["Infobox_ancient_site"] = 5600, ["Infobox_animanga/Footer"] = 7000, ["Infobox_animanga/Header"] = 7000, ["Infobox_animanga/Print"] = 5700, ["Infobox_animanga/Video"] = 4800, ["Infobox_architect"] = 3800, ["Infobox_artist"] = 29000, ["Infobox_artist_discography"] = 6000, ["Infobox_artwork"] = 12000, ["Infobox_athlete"] = 2800, ["Infobox_automobile"] = 8500, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3300, ["Infobox_baseball_team_season/season"] = 3300, ["Infobox_baseball_team_season/styles.css"] = 3300, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3100, ["Infobox_basketball_club/styles.css"] = 3100, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4500, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 53000, ["Infobox_boxer"] = 5800, ["Infobox_bridge"] = 6100, ["Infobox_building"] = 28000, ["Infobox_character"] = 7600, ["Infobox_chess_biography"] = 4100, ["Infobox_chess_player"] = 3300, ["Infobox_church"] = 15000, ["Infobox_church/denomination"] = 15000, ["Infobox_church/font_color"] = 15000, ["Infobox_civil_conflict"] = 2500, ["Infobox_civilian_attack"] = 5800, ["Infobox_college_coach"] = 12000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_football_player"] = 2300, ["Infobox_college_sports_team_season"] = 41000, ["Infobox_college_sports_team_season/link"] = 41000, ["Infobox_college_sports_team_season/name"] = 41000, ["Infobox_college_sports_team_season/succession"] = 41000, ["Infobox_college_sports_team_season/team"] = 41000, ["Infobox_comic_book_title"] = 3100, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 84000, ["Infobox_computing_device"] = 2400, ["Infobox_concert"] = 3400, ["Infobox_constituency"] = 5700, ["Infobox_country"] = 6600, ["Infobox_country/formernext"] = 6200, ["Infobox_country/imagetable"] = 5400, ["Infobox_country/multirow"] = 8500, ["Infobox_country/status_text"] = 2800, ["Infobox_country/styles.css"] = 6600, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4800, ["Infobox_court_case/images"] = 2600, ["Infobox_cricket_tournament"] = 2400, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 6600, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4600, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5700, ["Infobox_deity"] = 2100, ["Infobox_deity/color"] = 2000, ["Infobox_designation_list"] = 20000, ["Infobox_designation_list/entry"] = 18000, ["Infobox_dim"] = 7000, ["Infobox_dim/core"] = 7000, ["Infobox_diocese"] = 3900, ["Infobox_drug"] = 10000, ["Infobox_drug/chemical_formula"] = 10000, ["Infobox_drug/data_page_link"] = 10000, ["Infobox_drug/formatATC"] = 10000, ["Infobox_drug/formatCASnumber"] = 10000, ["Infobox_drug/formatChEBI"] = 10000, ["Infobox_drug/formatChEMBL"] = 10000, ["Infobox_drug/formatChemDBNIAID"] = 10000, ["Infobox_drug/formatChemSpider"] = 10000, ["Infobox_drug/formatCompTox"] = 10000, ["Infobox_drug/formatDrugBank"] = 10000, ["Infobox_drug/formatIUPHARBPS"] = 10000, ["Infobox_drug/formatJmol"] = 10000, ["Infobox_drug/formatKEGG"] = 10000, ["Infobox_drug/formatPDBligand"] = 9600, ["Infobox_drug/formatPubChemCID"] = 10000, ["Infobox_drug/formatPubChemSID"] = 10000, ["Infobox_drug/formatUNII"] = 10000, ["Infobox_drug/legal_status"] = 11000, ["Infobox_drug/licence"] = 10000, ["Infobox_drug/maintenance_categories"] = 10000, ["Infobox_drug/non-ref-space"] = 4500, ["Infobox_drug/pregnancy_category"] = 10000, ["Infobox_drug/title"] = 10000, ["Infobox_election"] = 31000, ["Infobox_election/row"] = 31000, ["Infobox_election/shortname"] = 29000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7400, ["Infobox_event"] = 5800, ["Infobox_family"] = 2200, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 159000, ["Infobox_film/short_description"] = 155000, ["Infobox_film_awards"] = 2700, ["Infobox_film_awards/link"] = 2700, ["Infobox_film_awards/style"] = 2700, ["Infobox_food"] = 7000, ["Infobox_football_biography"] = 209000, ["Infobox_football_club"] = 28000, ["Infobox_football_club_season"] = 21000, ["Infobox_football_league"] = 2600, ["Infobox_football_league_season"] = 20000, ["Infobox_football_match"] = 6000, ["Infobox_football_tournament_season"] = 8100, ["Infobox_former_subdivision"] = 3500, ["Infobox_former_subdivision/styles.css"] = 3500, ["Infobox_galaxy"] = 2100, ["Infobox_game"] = 2600, ["Infobox_game_score"] = 3600, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4500, ["Infobox_golfer/highest_ranking"] = 4500, ["Infobox_government_agency"] = 11000, ["Infobox_government_cabinet"] = 2800, ["Infobox_gridiron_football_person"] = 2300, ["Infobox_gridiron_football_person/position"] = 5600, ["Infobox_gymnast"] = 3600, ["Infobox_handball_biography"] = 5000, ["Infobox_historic_site"] = 12000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6400, ["Infobox_hospital/care_system"] = 6400, ["Infobox_hospital/lists"] = 6400, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3100, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5900, ["Infobox_islands"] = 9000, ["Infobox_islands/area"] = 9400, ["Infobox_islands/density"] = 9400, ["Infobox_islands/length"] = 9000, ["Infobox_islands/styles.css"] = 9000, ["Infobox_journal"] = 9800, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9500, ["Infobox_journal/Former_check"] = 9500, ["Infobox_journal/ISO_4_check"] = 9500, ["Infobox_journal/ISSN-eISSN"] = 9500, ["Infobox_journal/Indexing_search"] = 9600, ["Infobox_journal/MathSciNet_check"] = 9500, ["Infobox_journal/NLM_check"] = 9500, ["Infobox_journal/frequency"] = 8700, ["Infobox_lake"] = 4200, ["Infobox_language"] = 9600, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6600, ["Infobox_language/linguistlist"] = 9600, ["Infobox_language/ref"] = 7100, ["Infobox_law_enforcement_agency"] = 2000, ["Infobox_legislation"] = 2000, ["Infobox_legislature"] = 3800, ["Infobox_library"] = 2200, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 7700, ["Infobox_manner_of_address"] = 3400, ["Infobox_mapframe"] = 83000, ["Infobox_martial_artist"] = 5700, ["Infobox_martial_artist/record"] = 5700, ["Infobox_medal_templates"] = 426000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8100, ["Infobox_medical_details"] = 2100, ["Infobox_medical_person"] = 2000, ["Infobox_military_conflict"] = 23000, ["Infobox_military_installation"] = 9900, ["Infobox_military_person"] = 46000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2200, ["Infobox_model"] = 2300, ["Infobox_monument"] = 2100, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2400, ["Infobox_museum"] = 11000, ["Infobox_musical_artist"] = 123000, ["Infobox_musical_artist/color"] = 123000, ["Infobox_musical_artist/hCard_class"] = 319000, ["Infobox_musical_composition"] = 3000, ["Infobox_name"] = 7600, ["Infobox_name_module"] = 7400, ["Infobox_newspaper"] = 9900, ["Infobox_nobility"] = 2300, ["Infobox_noble"] = 7400, ["Infobox_officeholder"] = 228000, ["Infobox_officeholder/office"] = 234000, ["Infobox_official_post"] = 8300, ["Infobox_organization"] = 37000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 7700, ["Infobox_person"] = 492000, ["Infobox_person/Wikidata"] = 4600, ["Infobox_person/height"] = 104000, ["Infobox_person/length"] = 7100, ["Infobox_person/weight"] = 67000, ["Infobox_philosopher"] = 3500, ["Infobox_planet"] = 4700, ["Infobox_play"] = 4100, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3100, ["Infobox_prepared_food"] = 3000, ["Infobox_professional_wrestler"] = 4300, ["Infobox_professional_wrestling_event"] = 2800, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5600, ["Infobox_racing_driver"] = 4300, ["Infobox_racing_driver_series_section"] = 2300, ["Infobox_radio_show"] = 2100, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 3000, ["Infobox_rail_line"] = 7400, ["Infobox_rail_service"] = 3000, ["Infobox_rail_service/doc"] = 3000, ["Infobox_reality_competition_season"] = 3700, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6600, ["Infobox_religious_biography"] = 5500, ["Infobox_religious_building"] = 13000, ["Infobox_religious_building/color"] = 18000, ["Infobox_restaurant"] = 3200, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 22000, ["Infobox_royalty/short_description"] = 12000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 16000, ["Infobox_rugby_league_biography"] = 10000, ["Infobox_rugby_league_biography/PLAYER"] = 9900, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5100, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5700, ["Infobox_school_district/styles.css"] = 5700, ["Infobox_scientist"] = 49000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 564000, ["Infobox_settlement/areadisp"] = 241000, ["Infobox_settlement/columns"] = 96000, ["Infobox_settlement/columns/styles.css"] = 96000, ["Infobox_settlement/densdisp"] = 440000, ["Infobox_settlement/impus"] = 83000, ["Infobox_settlement/lengthdisp"] = 170000, ["Infobox_settlement/link"] = 96000, ["Infobox_settlement/metric"] = 213000, ["Infobox_settlement/pref"] = 296000, ["Infobox_settlement/styles.css"] = 564000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 41000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3500, ["Infobox_short_story"] = 2400, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 77000, ["Infobox_song/color"] = 77000, ["Infobox_song/link"] = 77000, ["Infobox_spaceflight"] = 3600, ["Infobox_spaceflight/styles.css"] = 3600, ["Infobox_sport_event"] = 2200, ["Infobox_sports_competition_event"] = 18000, ["Infobox_sports_competition_event/medalrow"] = 12000, ["Infobox_sports_league"] = 5100, ["Infobox_sports_season"] = 5600, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 109000, ["Infobox_stadium"] = 3200, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3500, ["Infobox_swimmer"] = 9800, ["Infobox_television"] = 58000, ["Infobox_television/Short_description"] = 55000, ["Infobox_television_channel"] = 6300, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9700, ["Infobox_television_station"] = 3500, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2700, ["Infobox_tennis_tournament_event"] = 19000, ["Infobox_tennis_tournament_year"] = 9400, ["Infobox_tennis_tournament_year/color"] = 29000, ["Infobox_tennis_tournament_year/footer"] = 29000, ["Infobox_tournament_season"] = 11000, ["Infobox_train"] = 2300, ["Infobox_university"] = 26000, ["Infobox_user"] = 2700, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 28000, ["Infobox_video_game/styles.css"] = 28000, ["Infobox_volleyball_biography"] = 5500, ["Infobox_weapon"] = 7400, ["Infobox_weather_event"] = 2100, ["Infobox_weather_event/Effects"] = 2100, ["Infobox_weather_event/Footer"] = 2100, ["Infobox_weather_event/History"] = 2000, ["Infobox_weather_event/meteorology"] = 2000, ["Infobox_weather_event/styles.css"] = 2100, ["Infobox_website"] = 7700, ["Infobox_writer"] = 40000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inline"] = 2100, ["Inline_block"] = 4800, ["Inprogress"] = 2500, ["Input_link"] = 32000, ["Instagram"] = 12000, ["Interlanguage_link"] = 169000, ["Interlanguage_link_multi"] = 17000, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2600, ["Intitle"] = 13000, ["Iptalk"] = 17000, ["IranCensus2006"] = 45000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 45000, ["Irc"] = 2100, ["Irish_place_name"] = 2700, ["IsIPAddress"] = 37000, ["IsValidPageName"] = 2700, ["Is_MLB_league"] = 3200, ["Is_NPB_league"] = 3300, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 508000, ["Is_redirect"] = 28000, ["Isbn"] = 8200, ["Isfdb_name"] = 3400, ["Isfdb_title"] = 4300, ["Isnumeric"] = 145000, ["Iso2continent"] = 37000, ["Iso2country"] = 24000, ["Iso2country/article"] = 23000, ["Iso2country/data"] = 24000, ["Iso2nationality"] = 207000, ["Issubst"] = 71000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5300, ["Italic_title"] = 271000, ["Italic_title_prefixed"] = 8700, ["Italics_colon"] = 3900, ["Italictitle"] = 3800, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 125000, ["Ivory_messagebox"] = 148000, ["Module:I18n/complex_date"] = 68000, ["Module:IP"] = 133000, ["Module:IPA"] = 145000, ["Module:IPA/data"] = 131000, ["Module:IPA/styles.css"] = 116000, ["Module:IPA_symbol"] = 5200, ["Module:IPA_symbol/data"] = 5200, ["Module:IPAc-en"] = 49000, ["Module:IPAc-en/data"] = 49000, ["Module:IPAc-en/phonemes"] = 49000, ["Module:IPAc-en/pronunciation"] = 49000, ["Module:IPAddress"] = 189000, ["Module:ISO_3166"] = 1030000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2200, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 9800, ["Module:ISO_3166/data/National"] = 1030000, ["Module:ISO_3166/data/PL"] = 7500, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 25000, ["Module:ISO_3166/data/US"] = 85000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 68000, ["Module:Icon"] = 593000, ["Module:Icon/data"] = 593000, ["Module:If_any_equal"] = 2800, ["Module:If_empty"] = 3760000, ["Module:If_in_page"] = 12000, ["Module:If_preview"] = 303000, ["Module:If_preview/configuration"] = 303000, ["Module:If_preview/styles.css"] = 303000, ["Module:Import_style"] = 12000, ["Module:In_lang"] = 363000, ["Module:Indent"] = 4700, ["Module:Infobox"] = 4180000, ["Module:Infobox/dates"] = 70000, ["Module:Infobox/styles.css"] = 4450000, ["Module:Infobox3cols"] = 301000, ["Module:InfoboxImage"] = 4510000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 422000, ["Module:Infobox_military_conflict"] = 23000, ["Module:Infobox_military_conflict/styles.css"] = 23000, ["Module:Infobox_multi-lingual_name"] = 21000, ["Module:Infobox_multi-lingual_name/data"] = 21000, ["Module:Infobox_power_station"] = 3100, ["Module:Infobox_road"] = 26000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 58000, ["Module:Infobox_television_disambiguation_check"] = 65000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 9200, ["Module:Infobox_television_season_name"] = 9700, ["Module:Internet_Archive"] = 19000, ["Module:IrelandByCountyCatNav"] = 3400, ["Module:Is_article"] = 2000, ["Module:Is_infobox_in_lead"] = 380000, ["Module:Is_instance"] = 329000, ["Module:Italic_title"] = 1130000, ["Module:Italic_title2"] = 5300, } 0199a97163562d13c0b1efae3a972ff61ab41c10 Module:Shortcut 828 534 1088 2024-03-11T03:26:56Z Infobox-person>Izno 0 Undid revision [[Special:Diff/1212853521|1212853521]] by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) no, that class is exclusive to the module in which it appears Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 03fd46a265e549852a9ed3d3a9249b247d84cb4f Module:Shortcut/styles.css 828 566 1152 2024-03-11T03:29:04Z Infobox-person>Izno 0 support dark mode text text/plain /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid #aaa; background: #fff; color: inherit; /* support dark mode */ padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid #aaa; margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em 0.4em 1em; line-height: 1.3; margin: 0; } 923cab4b9aa9eba5c8a1e53b9d1e2dd164948578 Module:Documentation/styles.css 828 517 1054 2024-03-11T03:56:36Z Infobox-person>Izno 0 adj text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } html.skin-night-mode-clientpref-1 .documentation, html.skin-night-mode-clientpref-1 .documentation-metadata { background-color: inherit; } @media (prefers-color-scheme: dark) { html.skin-night-mode-clientpref-2 .documentation, html.skin-night-mode-clientpref-2 .documentation-metadata { background-color: inherit; } } 92223f6a535f0908f32517eee0e93060e6ba30bd History of science and technology on the Indian subcontinent 0 577 1178 2024-03-12T16:41:55Z History of science and technology on the Indian subcontinent>Vic Park 0 wikitext text/x-wiki {{Short description|Overview of science and technology developed on the Indian subcontinent}} {{About|scientific and technological developments in ancient India|the modern-day Republic of India|Science and technology in India|modern-day Pakistan|Science and technology in Pakistan}} {{HistoryOfSouthAsia}} {{Science and technology in India}} The '''history of science and technology on the Indian subcontinent''' begins with the [[History of India#Prehistoric era (until c. 3300 BCE)|prehistoric human activity]] of the [[Indus Valley Civilisation]] to the early Indian states and empires.<ref>{{Cite web |url=http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |title=Distribution of Acheulian sites in the Siwalik region |access-date=2015-11-16 |archive-url=https://web.archive.org/web/20120104171240/http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |archive-date=2012-01-04 |url-status=dead }}</ref> ==Prehistory== {{See also|List of Indian inventions and discoveries}} [[File:Hand-propelled wheel cart from Indus Valley Civilization.GIF|thumb|Hand-propelled wheel cart, Indus Valley Civilization (3300–1300 BCE). Housed at the [[National Museum, New Delhi]].]] By 5500 BCE a number of sites similar to [[Mehrgarh]] (modern-day [[Pakistan]]) had appeared, forming the basis of later chalcolithic cultures.<ref name=Kenoyer230/> The inhabitants of these sites maintained trading relations with [[Central Asia]] and the [[Near East]].<ref name=Kenoyer230>Kenoyer, 230</ref> Irrigation was developed in the Indus Valley Civilization by around 4500 BCE.<ref name=R&U/> The size and prosperity of the Indus civilization grew as a result of this innovation, which eventually led to more planned settlements making use of [[drainage]] and [[sewerage]].<ref name=R&U>Rodda & Ubertini, 279</ref> Sophisticated irrigation and water storage systems were developed by the Indus Valley Civilization, including artificial [[reservoir]]s at [[Girnar]] dated to 3000 BCE, and an early [[canal]] irrigation system from c. 2600 BCE.<ref>Rodda & Ubertini, 161</ref> [[Cotton]] was cultivated in the region by the 5th–4th millennia BCE.<ref>Stein, 47</ref> [[Sugarcane]] was originally from tropical South and Southeast Asia.<ref name=Sharpe/> Different species likely originated in different locations with ''S. barberi'' originating in India, and ''S. edule'' and ''S. officinarum'' coming from [[New Guinea]].<ref name=Sharpe>Sharpe (1998)</ref> The inhabitants of the Indus valley developed a system of [[standardization]], using weights and measures, evident by the excavations made at the Indus valley sites.<ref name=Baber_b>Baber, 23</ref> This [[technical standard]]ization enabled gauging devices to be effectively used in [[angular measurement]] and measurement for construction.<ref name=Baber_b/> [[Calibration]] was also found in measuring devices along with multiple subdivisions in case of some devices.<ref name=Baber_b/> One of the earliest known [[Dock (maritime)|dock]]s is at [[Lothal]] (2400 BCE), located away from the main current to avoid deposition of silt.<ref name="RaoQ"/> Modern oceanographers have observed that the [[Indus Valley Civilisation#Early Harappan|Harappans]] must have possessed knowledge relating to tides in order to build such a dock on the ever-shifting course of the [[Sabarmati]], as well as exemplary [[hydrography]] and maritime engineering.<ref name="RaoQ">Rao, 27–28</ref> Excavations at [[Balakot]] ([[Kot Bala]]) (c. 2500–1900 BCE), modern day Pakistan, have yielded evidence of an early [[Metallurgical furnace|furnace]].<ref name=Dales/> The furnace was most likely used for the manufacturing of [[ceramic]] objects.<ref name=Dales>Dales, 3–22 [10]</ref> [[Oven]]s, dating back to the civilization's mature phase (c. 2500–1900 BCE), were also excavated at Balakot.<ref name=Dales/> The [[Kalibangan]] archeological site further yields evidence of potshaped [[hearth]]s, which at one site have been found both on ground and underground.<ref name=Baber20>Baber, 20</ref> [[Kiln]]s with fire and kiln chambers have also been found at the Kalibangan site.<ref name=Baber20/> [[File:Ashoka pillar at Vaishali, Bihar, India.jpg|thumb|left|View of the Ashokan Pillar at [[Vaishali (ancient city)|Vaishali]]. One of the [[edicts of Ashoka]] (272–231 BCE) reads: "Everywhere King Piyadasi (Ashoka) erected two kinds of hospitals, hospitals for people and hospitals for animals. Where there were no healing herbs for people and animals, he ordered that they be bought and planted."<ref name=finger12>Finger, 12</ref>]] Based on archaeological and textual evidence, [[Joseph E. Schwartzberg]] (2008)—a [[University of Minnesota]] [[professor emeritus]] of geography—traces the origins of [[Indian cartography]] to the Indus Valley Civilization (c. 2500–1900 BCE).<ref name=Schwartzberg1/> The use of large scale constructional plans, cosmological drawings, and cartographic material was known in [[South Asia]] with some regularity since the [[Vedic period]] (2nd – 1st millennium BCE).<ref name=Schwartzberg1>"We now believe that some form of mapping was practiced in what is now India as early as the Mesolithic period, that surveying dates as far back as the Indus Civilization (ca. 2500–1900 BCE), and that the construction of large-scale plans, cosmographic maps, and other cartographic works has occurred continuously at least since the late Vedic age (first millennium BCE)" — Joseph E. Schwartzberg, 1301.</ref> Climatic conditions were responsible for the destruction of most of the evidence, however, a number of excavated surveying instruments and measuring rods have yielded convincing evidence of early cartographic activity.<ref name=Schwartzberg1301-1302>Schwartzberg, 1301–1302</ref> Schwartzberg (2008)—on the subject of surviving maps—further holds that: 'Though not numerous, a number of map-like graffiti appear among the thousands of Stone Age Indian cave paintings; and at least one complex Mesolithic diagram is believed to be a representation of the cosmos.'<ref name=Schwartzberg1301>Schwartzberg, 1301</ref> Archeological evidence of an animal-drawn [[plough]] dates back to 2500 BCE in the Indus Valley Civilization.<ref name=lal>Lal (2001)</ref> The earliest available [[sword]]s of copper discovered from the Harappan sites date back to 2300 BCE.<ref name=allchin1/> Swords have been recovered in archaeological findings throughout the [[Ganges]]–[[Jaunpur, Uttar Pradesh|Jamuna]] [[Doab]] region of India, consisting of [[bronze]] but more commonly copper.<ref name=allchin1>Allchin, 111–112</ref> ==Early kingdoms== [[File:Ganesha ink.jpg|thumb|Ink drawing of Ganesha under an umbrella (early 19th century). [[India ink|Carbon pigment]] [[Ink]], called ''masi'', and popularly known as [[India ink]] was an admixture of several chemical components, has been used in India since at least the 4th century BCE.<ref>Banerji, 673</ref> The practice of writing with ink and a sharp pointed needle was common in early [[South India]].<ref>Sircar, 62</ref> Several [[Jain]] sutras in India were compiled in [[India ink|Carbon pigment]] [[Ink]].<ref>Sircar, 67</ref> ]] [[File:Hindu-arabic1.jpg|thumb|The ''Hindu-Arabic numeral'' system. The inscriptions on the edicts of Ashoka (1st millennium BCE) display this number system being used by the Imperial Mauryas.]] The religious texts of the [[Vedic period]] provide evidence for the use of [[History of large numbers|large numbers]].<ref name=hayashi2005-p360-361/> By the time of the last Veda, the ''[[Yajurveda|{{IAST|Yajurvedasaṃhitā}}]]'' (1200–900 BCE), numbers as high as <math>10^{12}</math> were being included in the texts.<ref name=hayashi2005-p360-361>Hayashi, 360–361</ref> For example, the ''[[mantra]]'' (sacrificial formula) at the end of the ''annahoma'' ("food-oblation rite") performed during the ''[[Ashvamedha|aśvamedha]]'' ("an allegory for a horse sacrifice"), and uttered just before-, during-, and just after sunrise, invokes powers of ten from a hundred to a trillion.<ref name=hayashi2005-p360-361/> The [[Shatapatha Brahmana]] (9th century BCE) contains rules for ritual geometric constructions that are similar to the Sulba Sutras.<ref>Seidenberg, 301–342</ref> [[Baudhayana]] (c. 8th century BCE) composed the ''Baudhayana Sulba Sutra'', which contains examples of simple [[Pythagorean triple]]s,<ref>{{citation |first=Meera |last=Nanda |title=Hindutva's science envy |url=http://www.frontline.in/science-and-technology/hindutvas-science-envy/article9049883.ece |newspaper=Frontline |date=16 September 2016 |access-date=14 October 2016}}</ref> such as: <math>(3, 4, 5)</math>, <math>(5, 12, 13)</math>, <math>(8, 15, 17)</math>, <math> (7, 24, 25)</math>, and <math>(12, 35, 37)</math><ref name=joseph229>Joseph, 229</ref> as well as a statement of the [[Pythagorean theorem]] for the sides of a square: "The rope which is stretched across the diagonal of a square produces an area double the size of the original square."<ref name=joseph229/> It also contains the general statement of the Pythagorean theorem (for the sides of a rectangle): "The rope stretched along the length of the diagonal of a rectangle makes an area which the vertical and horizontal sides make together."<ref name=joseph229/> Baudhayana gives a formula for the [[square root of two]].<ref name=cooke200>Cooke, 200</ref> Mesopotamian influence at this stage is considered likely.<ref name="Boyer 1991 loc=China and India p. 207">{{Harv|Boyer|1991|loc="China and India" p. 207}}</ref> The earliest [[Indian astronomy|Indian astronomical]] text—named ''[[Vedanga Jyotisha|{{IAST|Vedānga Jyotiṣa}}]]'' and attributed to ''Lagadha''—is considered one of the oldest astronomical texts, dating from 1400 to 1200 BCE (with the extant form possibly from 700 to 600 BCE),<ref name=Cosmic>{{cite book|last=Subbarayappa|first=B. V.|editor=Biswas, S. K. |editor2=Mallik, D. C. V. |editor3=Vishveshwara, C. V. |editor3-link=C. V. Vishveshwara |title=Cosmic Perspectives|chapter-url=https://books.google.com/books?id=PFTGKi8fjvoC&pg=FA25|date=14 September 1989|publisher=Cambridge University Press|isbn=978-0-521-34354-1|pages=25–40|chapter=Indian astronomy: An historical perspective}}</ref> it details several astronomical attributes generally applied for timing social and religious events. It also details astronomical calculations, calendrical studies, and establishes rules for empirical observation.<ref name= Subbaarayappa>Subbaarayappa, 25–41</ref> Since the ''{{IAST|Vedānga Jyotiṣa}}'' is a religious text, it has connections with [[hindu astrology]] and details several important aspects of the time and seasons, including lunar months, solar months, and their adjustment by a lunar leap month of ''Adhikamāsa''.<ref name=Tripathi08>Tripathi, 264–267</ref> ''[[Ritu (Indian season)|Ritus]]'' and ''[[Yuga]]s'' are also described.<ref name=Tripathi08/> Tripathi (2008) holds that "Twenty-seven constellations, eclipses, seven planets, and twelve signs of the zodiac were also known at that time."<ref name=Tripathi08/> The [[Egypt]]ian ''Papyrus of Kahun'' (1900 BCE) and literature of the [[Vedic period]] in India offer early records of [[veterinary medicine]].<ref>Thrusfield, 2</ref> Kearns & Nash (2008) state that mention of [[leprosy]] is described in the medical treatise ''[[Sushruta Samhita]]'' (6th century BCE). The [[Sushruta Samhita]] an [[Ayurvedic]] text contains 184 chapters and description of 1120 illnesses, 700 medicinal plants, a detailed study on Anatomy, 64 preparations from mineral sources and 57 preparations based on animal sources.<ref name=Dwivedi&Dwivedi07 /><ref name=k&n08>Kearns & Nash (2008)</ref> However, ''The Oxford Illustrated Companion to Medicine'' holds that the mention of leprosy, as well as ritualistic cures for it, were described in the Hindu religious book ''[[Atharvaveda]]'', written in 1500–1200 BCE.<ref>Lock etc., 420</ref> [[Cataract surgery]] was known to the physician [[Sushruta]] (6th century BCE).<ref name=finger66>Finger, 66</ref> Traditional cataract surgery was performed with a special tool called the ''Jabamukhi Salaka'', a curved needle used to loosen the lens and push the cataract out of the field of vision.<ref name=finger66/> The eye would later be soaked with warm butter and then bandaged.<ref name=finger66/> Though this method was successful, Susruta cautioned that it should only be used when necessary.<ref name=finger66/> The removal of cataract by surgery was also introduced into China from India.<ref>Lade & Svoboda, 85</ref> Sushruta's treatise provides the first written record of a cheek flap rhinoplasty, a technique still used today to reconstruct a nose.{{citation needed|date=November 2023}}<!-- Empty reference <ref name="Wujastyk 2023"/--> The text mentions more than 15 methods to repair it. These include using a flap of skin from the cheek, which is akin to the most modern technique today.<ref>{{Cite web|title=An English Translation of the Sushruta Samhita, Based on Original Sanskrit Text. Edited and Published by Kaviraj Kunja Lal Bhishagratna. With a Full ... Notes, Comperative Views, Index, Glossary An (Book)|url=https://www.worldhistory.org/books/1296562271/|access-date=2021-05-15|website=www.worldhistory.org|date=8 August 2015 |publisher=Andesite Press |isbn=9781296562274 |language=en}}</ref><ref>{{Cite web|title=Sushruta Samhita: The Ancient Treatise on Surgery|url=https://www.livehistoryindia.com/story/snapshort-histories/sushruta-samhita-the-ancient-treatise-on-surgery/|access-date=2021-05-15|website=Live History India|date=27 November 2017 |language=en-US}}</ref>''Otoplasty''' (surgery of the ear) was developed in [[History of India|ancient India]] and is described in the medical compendium, the {{transl|sa|[[Sushruta Samhita]]}} (Sushruta's Compendium, {{circa|500 AD}}).the first description of a surgical procedure to treat stones was described in the [[Sushruta Samhita]] by [[Sushruta]] around 600 BC.<ref name=":0" /> Two types of diabetes were identified as separate conditions for the first time by the Indian physicians [[Sushruta]] and [[Charaka]] in 400–500&nbsp;CE with one type being associated with youth and another type with being overweight.<ref name=History2010/> Effective treatment was not developed until the early part of the 20th century when Canadians [[Frederick Banting]] and [[Charles Best (medical scientist)|Charles Best]] isolated and purified insulin in 1921 and 1922.<ref name=History2010/> This was followed by the development of the long-acting insulin [[NPH insulin|NPH]] in the 1940s.<ref name=History2010/> The condition was named "hritshoola" in ancient India and was described by [[Sushruta]] (6th century BC).<ref name="Dwivedi&Dwivedi07">{{cite journal| vauthors = Dwivedi G, Dwivedi S |year=2007 |url=http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |title=Sushruta – the Clinician – Teacher par Excellence |journal=The Indian Journal of Chest Diseases and Allied Sciences |volume=49 |pages=243–4 |url-status = dead|archive-url=https://web.archive.org/web/20081010045900/http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |archive-date=2008-10-10}}</ref> [[Angina Pectoris]] During the 5th century BCE, the scholar [[Pāṇini]] had made several discoveries in the fields of [[phonetics]], [[phonology]], and [[morphology (linguistics)|morphology]].<ref name=Ivic>Encyclopædia Britannica (2008), ''Linguistics''.</ref> [[Pāṇini]]'s morphological analysis remained more advanced than any equivalent Western theory until the mid-20th century.<ref>{{cite book | last1 = Staal | first1 = Frits | title = Universals: studies in Indian logic and linguistics | url = https://archive.org/details/universalsstudie00staa | url-access = limited | publisher = University of Chicago Press | year = 1988 | pages = [https://archive.org/details/universalsstudie00staa/page/n57 47] }}</ref> [[Metal]] [[currency]] was minted in India before the 5th century BCE,<ref name=Dhavalikar>Dhavalikar, 330–338</ref><ref name=sellwood2008>Sellwood (2008)</ref> with coinage (400 BCE–100 CE) being made of [[silver]] and copper, bearing animal and plant symbols on them.<ref name=EBAllan&Stern>Allan & Stern (2008)</ref> [[Zinc]] mines of Zawar, near [[Udaipur]], [[Rajasthan]], were active during 400 BCE.<ref name=Craddock>Craddock (1983)</ref><ref>[[Arun Kumar Biswas]], "The primacy of India in ancient brass and zinc metallurgy", Indian J History of Science, 28(4) (1993) page 309–330; and "Brass and zinc metallurgy in the ancient and medieval world: India's primacy and the technology transfer to the west", Indian J History of Science, 41(2) (2006) 159–174</ref> Diverse specimens of swords have been discovered in [[Fatehgarh]], where there are several varieties of hilt.<ref>F.R. Allchin, 111–112</ref> These swords have been variously dated to periods between 1700 and 1400 BCE, but were probably used more extensively during the opening centuries of the 1st millennium BCE.<ref name=Allchin114>Allchin, 114</ref> Archaeological sites in such as Malhar, Dadupur, Raja Nala Ka Tila and Lahuradewa in present-day [[Uttar Pradesh]] show iron implements from the period between 1800 BCE and 1200 BCE.<ref name=Tewari>Tewari (2003)</ref> Early iron objects found in India can be dated to 1400 BCE by employing the method of radio carbon dating.<ref name=Ceccarelli>Ceccarelli, 218</ref> Some scholars believe that by the early 13th century BCE iron smelting was practiced on a bigger scale in India, suggesting that the date of the technology's inception may be placed earlier.<ref name=Tewari/> In [[Southern India]] (present day [[Mysore]]) iron appeared as early as 11th to 12th centuries BCE.<ref name=UCP/> These developments were too early for any significant close contact with the northwest of the country.<ref name=UCP>Drakonoff, 372</ref> ==Middle Kingdoms (230 BCE – 1206 CE)== [[File:QtubIronPillar.JPG|thumb|The [[iron pillar of Delhi]] (375–413 CE). The first iron pillar was the Iron pillar of Delhi, erected at the times of Chandragupta II Vikramaditya.]] The ''[[Arthashastra]]'' of [[Kautilya]] mentions the construction of dams and bridges.<ref>Dikshitar, pg. 332</ref> The use of [[suspension bridge]]s using plaited bamboo and iron chain was visible by about the 4th century.<ref>Encyclopædia Britannica (2008), ''suspension bridge''.</ref> The ''[[stupa]]'', the precursor of the [[pagoda]] and [[torii]], was constructed by the 3rd century BCE.<ref name=Ency>Encyclopædia Britannica (2008), ''Pagoda''.</ref><ref name=Jaanus>[http://www.aisf.or.jp/~jaanus/ Japanese Architecture and Art Net Users System (2001), ''torii''.]</ref> Rock-cut [[step well]]s in the region date from 200 to 400 CE.<ref name=L&B/> Subsequently, the construction of wells at Dhank (550–625 CE) and stepped ponds at [[Bhinmal]] (850–950 CE) took place.<ref name=L&B>Livingston & Beach, xxiii</ref> During the 1st millennium BCE, the [[Vaisheshika]] school of [[atomism]] was founded. The most important proponent of this school was [[Kanada (philosopher)|Kanada]], an [[Indian philosophy|Indian philosopher]].<ref>Oliver Leaman, ''Key Concepts in Eastern Philosophy.'' Routledge, 1999, page 269.</ref> The school proposed that [[atom]]s are indivisible and eternal, can neither be created nor destroyed,<ref>{{harvnb|Chattopadhyaya|1986|pp=169–70}}</ref> and that each one possesses its own distinct {{IAST |viśeṣa}} (individuality).<ref>{{harvnb|Choudhury|2006|p=202}}</ref> It was further elaborated on by the [[Buddhist atomism|Buddhist school of atomism]], of which the philosophers [[Dharmakirti]] and [[Dignāga]] in the 7th century CE were the most important proponents. They considered atoms to be point-sized, durationless, and made of energy.<ref>(Stcherbatsky 1962 (1930). Vol. 1. P. 19)</ref> By the beginning of the [[Common Era]] glass was being used for ornaments and casing in the region.<ref name=Ghosh/> Contact with the [[Greco-Roman world]] added newer techniques, and local artisans learnt methods of glass molding, decorating and coloring by the early centuries of the Common Era.<ref name=Ghosh>Ghosh, 219</ref> The [[Satavahana]] period further reveals short cylinders of composite glass, including those displaying a lemon yellow matrix covered with green glass.<ref name=Ghosh2>"Ornaments, Gems etc." (Ch. 10) in Ghosh 1990.</ref> [[Wootz]] originated in the region before the beginning of the common era.<ref>Srinivasan & Ranganathan</ref> Wootz was exported and traded throughout Europe, China, the Arab world, and became particularly famous in the Middle East, where it became known as [[Damascus steel]]. Archaeological evidence suggests that manufacturing process for Wootz was also in existence in South India before the Christian era.<ref name=Srinivasan94>Srinivasan (1994)</ref><ref>Srinivasan & Griffiths</ref> Evidence for using bow-instruments for [[carding]] comes from India (2nd century CE).<ref name=Baber57>Baber, 57</ref> The mining of [[Diamond (gemstone)|diamonds]] and its early use as gemstones originated in India.<ref name=Wenk1>Wenk, 535–539</ref> [[Golconda]] served as an important early center for diamond mining and processing.<ref name=Wenk1/> Diamonds were then exported to other parts of the world.<ref name=Wenk1/> Early reference to diamonds comes from Sanskrit texts.<ref name=Encarta11>MSN Encarta (2007), [http://encarta.msn.com/encyclopedia_761557986/Diamond.html ''Diamond'']. [https://web.archive.org/web/20091028121034/http://encarta.msn.com/encyclopedia_761557986/Diamond.html Archived] 2009-10-31.</ref> The ''Arthashastra'' also mentions diamond trade in the region.<ref name=lee1>Lee, 685</ref> The [[Iron pillar of Delhi]] was erected at the times of [[Chandragupta II]] Vikramaditya (375–413), which stood without rusting for around 2 millennium.<ref>Balasubramaniam, R., 2002</ref> The [[Rasaratna Samuchaya]] (800) explains the existence of two types of ores for zinc metal, one of which is ideal for metal extraction while the other is used for medicinal purpose.<ref name=Craddock2>Craddock, 13</ref> In the 2nd century, the [[Buddhist philosophy|Buddhist]] philosopher [[Nagarjuna]] refined the ''Catuskoti'' form of logic. The Catuskoti is also often glossed ''[[Tetralemma]]'' (Greek) which is the name for a largely comparable, but not equatable, 'four corner argument' within the tradition of [[Classical logic]]. The origins of the [[spinning wheel]] are unclear but [[South Asia]] is one of the probable places of its origin.<ref>Britannica Concise Encyclopedia (2007), ''spinning wheel''.</ref><ref>Encyclopeedia Britnnica (2008). ''spinning''.</ref> The device certainly reached Europe from India by the 14th century.<ref>MSN Encarta (2008), [http://encarta.msn.com ''Spinning'']. 2009-10-31.</ref> The cotton gin was invented in [[South Asia]] as a mechanical device known as ''charkhi'', the "wooden-worm-worked roller".<ref name="Baber57">Baber, 57</ref> This mechanical device was, in some parts of the region, driven by water power.<ref name="Baber57"/> The [[Ajanta Caves]] yield evidence of a single roller [[cotton gin]] in use by the 5th century.<ref name=Babergin>Baber, 56</ref> This cotton gin was used until further innovations were made in form of foot powered gins.<ref name=Babergin/> Chinese documents confirm at least two missions to India, initiated in 647, for obtaining technology for sugar-refining.<ref name=Kieschnick11>Kieschnick, 258</ref> Each mission returned with different results on refining sugar.<ref name=Kieschnick11/> [[Pingala]] (300–200 BCE) was a [[musical theory|musical theorist]] who authored a [[Sanskrit]] treatise on [[Prosody (music)|prosody]]. There is evidence that in his work on the enumeration of syllabic combinations, Pingala stumbled upon both the [[Pascal triangle]] and [[Binomial coefficients]], although he did not have knowledge of the [[Binomial theorem]] itself.<ref name=fowler96>Fowler, 11</ref><ref name=singh36>Singh, 623–624</ref> A description of [[binary numbers]] is also found in the works of Pingala.<ref>Sanchez & Canton, 37</ref> The Indians also developed the use of the law of signs in multiplication. Negative numbers and the subtrahend had been used in [[East Asia]] since the 2nd century BCE, and [[South Asian]] mathematicians were aware of negative numbers by the 7th century CE,<ref name=Smith>Smith (1958), page 258</ref> and their role in mathematical problems of debt was understood.<ref name=bourbaki49>Bourbaki (1998), page 49</ref> Although the Indians were not the first to use the subtrahend, they were the first to establish the "law of signs" with regards to the multiplication of positive and negative numbers, which did not appear in East Asian texts until 1299.<ref name=Smith2>Smith (1958), page 257–258</ref> Mostly consistent and correct rules for working with negative numbers were formulated,<ref name=bourbaki46>{{Harvnb|Bourbaki|1998|p=46}}</ref> and the diffusion of these rules led the Arab intermediaries to pass it on to Europe.<ref name=bourbaki49/> A [[decimal|decimal number system]] using hieroglyphics dates back to 3000 BC in [[Egypt]],<ref>Georges Ifrah: ''From One to Zero. A Universal History of Numbers'', Penguin Books, 1988, {{ISBN|0-14-009919-0}}, pp. 200–213 (Egyptian Numerals)</ref> and was later in use in ancient India.<ref name=irfah346>Ifrah, 346</ref> By the 9th century CE, the [[Hindu–Arabic numeral system]] was transmitted from the Middle East and to the rest of the world.<ref name="Wigelsworth">{{cite book|author=Jeffrey Wigelsworth|title=Science And Technology in Medieval European Life|url=https://books.google.com/books?id=VPDqnGGHpHYC&pg=PA18|date=1 January 2006|publisher=Greenwood Publishing Group|isbn=978-0-313-33754-3|page=18}}</ref> The concept of [[zero|0]] as a number, and not merely a symbol for separation is attributed to India.<ref name=bourbaki46_2>Bourbaki, 46</ref> In India, practical calculations were carried out using zero, which was treated like any other number by the 9th century CE, even in case of division.<ref name=bourbaki46/><ref name=ebcal>Britannica Concise Encyclopedia (2007). ''algebra''</ref> [[Brahmagupta]] (598–668) was able to find (integral) solutions of [[Pell's equation]]<ref name=sw101>Stillwell, 72–73</ref> and first described [[gravity]] as an attractive force, and used the term "gurutvākarṣaṇam (गुरुत्वाकर्षणम्)]" in Sanskrit to describe it.<ref name="Oxford">{{cite book|last=Pickover|first=Clifford|url=https://books.google.com/books?id=SQXcpvjcJBUC&pg=PA105|title=Archimedes to Hawking: Laws of Science and the Great Minds Behind Them|date=2008|publisher=Oxford University Press|isbn=978-0-19-979268-9|page=105}}</ref> Conceptual design for a [[perpetual motion machine]] by [[Bhāskara II|Bhaskara II]] dates to 1150. He described a wheel that he claimed would run forever.<ref>Lynn Townsend White, Jr.</ref> The [[Trigonometry|trigonometric]] functions of [[sine]] and [[versine]], from which it was trivial to derive the cosine, were used by the mathematician, [[Aryabhata]], in the late 5th century.<ref>O'Connor, J. J. & Robertson, E.F. (1996)</ref><ref>"Geometry, and its branch trigonometry, was the mathematics Indian astronomers used most frequently. In fact, the Indian astronomers in the third or fourth century, using a pre-Ptolemaic Greek table of chords, produced tables of sines and versines, from which it was trivial to derive cosines. This new system of trigonometry, produced in India, was transmitted to the Arabs in the late eighth century and by them, in an expanded form, to the Latin West and the Byzantine East in the twelfth century" – Pingree (2003).</ref> The [[calculus]] theorem now known as "[[Rolle's theorem]]" was stated by mathematician, [[Bhāskara II]], in the 12th century.<ref>Broadbent, 307–308</ref> [[File:The Defeat of Baz Bahadur of Malwa by the Mughal Troops, 1561, Akbarnama.jpg|thumb|[[Akbarnama]]—written by August 12, 1602—depicts the defeat of [[Baz Bahadur]] of [[Malwa]] by the [[Mughal Empire|Mughal]] troops, 1561. The Mughals extensively improved metal weapons and armor used by the armies of India.]] [[Indigo dye|Indigo]] was used as a dye in [[South Asia]], which was also a major center for its production and processing.<ref name=k&c>Kriger & Connah, 120</ref> The ''Indigofera tinctoria'' variety of Indigo was domesticated in India.<ref name=k&c/> Indigo, used as a dye, made its way to the [[ancient Greece|Greeks]] and the [[Ancient Rome|Romans]] via various trade routes, and was valued as a luxury product.<ref name=k&c/> The [[cashmere wool]] fiber, also known as ''pashm'' or ''pashmina'', was used in the handmade shawls of Kashmir.<ref>Encyclopædia Britannica (2008), ''cashmere''.</ref> The woolen shawls from [[Kashmir]] region find written mention between 3rd century BCE and the 11th century CE.<ref name=ebpasm>Encyclopædia Britannica (2008), ''Kashmir shawl''.</ref> Crystallized sugar was discovered by the time of the [[Gupta Empire]],<ref name=Adas>Shaffer, 311</ref> and the earliest reference to candied sugar comes from India.<ref name=Kieschnick1>Kieschnick (2003)</ref> [[Jute]] was also cultivated in India.<ref name=ebjute>Encyclopædia Britannica (2008), ''jute''.</ref> [[Muslin]] was named after the city where Europeans first encountered it, [[Mosul]], in what is now [[Iraq]], but the fabric actually originated from [[Dhaka]] in what is now [[Bangladesh]].<ref>{{cite book |last=Karim |first=Abdul |year=2012 |chapter=Muslin |chapter-url=http://en.banglapedia.org/index.php?title=Muslin |editor1-last=Islam |editor1-first=Sirajul |editor1-link=Sirajul Islam |editor2-last=Jamal |editor2-first=Ahmed A. |title=Banglapedia: National Encyclopedia of Bangladesh |edition=Second |publisher=[[Asiatic Society of Bangladesh]]}}</ref><ref name=Muslin>Ahmad, 5–26</ref> In the 9th century, an [[Islamic economics in the world|Arab merchant]] named Sulaiman makes note of the material's origin in [[Bengal]] (known as ''Ruhml'' in [[Arabic language|Arabic]]).<ref name=Muslin/> European scholar Francesco Lorenzo Pullè reproduced a number of Indian maps in his magnum opus ''La Cartografia Antica dell India''.<ref name=Sircar2>Sircar 328</ref> Out of these maps, two have been reproduced using a manuscript of ''Lokaprakasa'', originally compiled by the polymath Ksemendra ([[Kashmir]], 11th century CE), as a source.<ref name=Sircar2/> The other manuscript, used as a source by Francesco I, is titled ''Samgraha''.<ref name=Sircar2/> ''[[Samarangana Sutradhara]]'', a [[Sanskrit]] treatise by [[Bhoja]] (11th century), includes a chapter about the construction of mechanical contrivances ([[automata]]), including mechanical bees and birds, fountains shaped like humans and animals, and male and female dolls that refilled oil lamps, danced, played instruments, and re-enacted scenes from Hindu mythology.<ref>{{cite book|last=Varadpande|first=Manohar Laxman|year=1987|title=History of Indian Theatre, Volume 1|page=68|publisher=Abhinav Publications |isbn=9788170172215|url=https://books.google.com/books?id=SyxOHOCVcVkC&pg=PA68}}</ref><ref>{{cite book|last= Wujastyk|first=Dominik|year=2003|title=The Roots of Ayurveda: Selections from Sanskrit Medical Writings|page=222|publisher=Penguin |isbn=9780140448245|url=https://books.google.com/books?id=TaZCwjtmzZYC&q=automata&pg=PA222}}</ref><ref>{{cite book|last=Needham|first=Joseph|year=1965|title=Science and Civilisation in China: Volume 4, Physics and Physical Technology Part 2, Mechanical Engineering|page=164|publisher=Cambridge University Press |isbn=9780521058032|url=https://books.google.com/books?id=SeGyrCfYs2AC&q=bhoja+automata&pg=PA164}}</ref> == Late Medieval (1206–1527) == [[Madhava of Sangamagrama]] (c. 1340 – 1425) and his [[Kerala school of astronomy and mathematics]] developed and founded [[mathematical analysis]].<ref>{{cite web |publisher = School of Mathematics and Statistics University of St Andrews, Scotland |work = Biography of Madhava |author1 = J J O'Connor |author2 = E F Robertson |url = http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |title = Mādhava of Sangamagrāma |access-date = 2007-09-08 |archive-url = https://web.archive.org/web/20060514012903/http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |archive-date = 2006-05-14 |url-status = dead }}</ref> The infinite series for [[pi|π]] was stated by him, and he made use of the series expansion of <math>\arctan x</math> to obtain an infinite series expression, now known as the ''Madhava-Gregory series'', for <math>\pi</math>. Their rational approximation of the ''error'' for the finite sum of their series are of particular interest. They manipulated the error term to derive a faster converging series for <math>\pi</math>. They used the improved series to derive a rational expression,<ref name="roy" /> <math>104348/33215</math> for <math>\pi</math> correct up to nine decimal places, ''i.e.'' <math>3.141592653 </math> (of 3.1415926535897...).<ref name="roy">Roy, 291–306</ref> The development of the [[Series (mathematics)|series]] expansions for [[trigonometric function]]s (sine, cosine, and [[arc tangent]]) was carried out by mathematicians of the Kerala School in the 15th century CE.<ref name="sll" /> Their work, completed two centuries before the invention of [[calculus]] in Europe, provided what is now considered the first example of a [[power series]] (apart from geometric series).<ref name="sll">Stillwell, 173</ref> Mathmatation [[Narayana Pandita (mathematician)|Narayana Pandit]] wrote two works, an arithmetical treatise called ''Ganita Kaumudi'' and an [[Algebra|algebraic]] treatise called ''Bijaganita Vatamsa''. Narayana is also made contributions to algebra and [[Magic square|magic squares]].Narayana's other major works contain a variety of investigations into the second order [[indeterminate equation]] ''nq''<sup>2</sup> + 1 = ''p''<sup>2</sup> ([[Pell's equation]]), solutions of indeterminate [[Degree of a polynomial|higher-order equations]] Narayana has also made contributions to the topic of [[Cyclic quadrilateral|cyclic quadrilaterals]]. The [[Navya Nyaya]] school began around [[East India|eastern India]] and [[Bengal]], and developed theories resembling modern logic, such as [[Gottlob Frege]]'s "distinction between sense and reference of proper names" and his "definition of number," as well as the Navya-Nyaya theory of "restrictive conditions for universals" anticipating some of the developments in modern [[set theory]].<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873|quote=This paper consists of three parts. The first part deals with Frege's distinction between sense and reference of proper names and a similar distinction in Navya-Nyaya logic. In the second part we have compared Frege's definition of number to the Navya-Nyaya definition of number. In the third part we have shown how the study of the so-called 'restrictive conditions for universals' in Navya-Nyaya logic anticipated some of the developments of modern set theory.}}</ref> Udayana in particular developed theories on "restrictive conditions for universals" and "[[Infinity|infinite]] regress" that anticipated aspects of modern set theory. According to Kisor Kumar Chakrabarti:<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873}}</ref> The [[Navya-Nyāya]] or Neo-Logical darśana (school) of Indian philosophy was founded in the 13th century CE by the philosopher [[Gangesha Upadhyaya]] of [[Mithila (India)|Mithila]]. It was a development of the classical Nyāya darśana. Other influences on Navya-Nyāya were the work of earlier philosophers [[Vācaspati Miśra]] (900–980 CE) and [[Udayana]] (late 10th century).Navya-Nyāya developed a sophisticated language and conceptual scheme that allowed it to raise, analyse, and solve problems in logic and epistemology. It systematised all the Nyāya concepts into four main categories: sense or perception (pratyakşa), inference (anumāna), comparison or similarity ([[upamāna]]), and testimony (sound or word; śabda). [[Sher Shah Suri|Shēr Shāh]] of northern India issued silver currency bearing Islamic motifs, later imitated by the [[Mughal Empire]].<ref name="EBAllan&Stern" /> The Chinese merchant [[Ma Huan]] (1413–51) noted that gold coins, known as ''fanam'', were issued in [[Cochin]] and weighed a total of one ''fen'' and one ''li'' according to the Chinese standards.<ref name="Chaudhuri223">Chaudhuri, 223</ref> They were of fine quality and could be exchanged in China for 15 silver coins of four-''li'' weight each.<ref name="Chaudhuri223" /> [[File:Jahangir holding a globe, 1614-1618.jpg|alt=|left|thumb|[[Jahangir]] holding a seamless [[celestial globe]]. This was one of the first examples of Seamless hollow Metallurgy. ]] In 1500, [[Nilakantha Somayaji]] of the [[Kerala school of astronomy and mathematics]], in his [[Tantrasangraha]], revised Aryabhata's elliptical model for the planets Mercury and Venus. His equation of the centre for these planets remained the most accurate until the time of [[Johannes Kepler]] in the 17th century.<ref>Joseph, George G. (2000), ''The Crest of the Peacock: Non-European Roots of Mathematics'', Penguin Books, {{ISBN|0-691-00659-8}}. </ref> Gunpowder and gunpowder weapons were transmitted to India through the [[Mongol invasions of India]].<ref name="Kn">{{cite book|author=Iqtidar Alam Khan|title=Gunpowder And Firearms: Warfare In Medieval India|year=2004|publisher=Oxford University Press|isbn=978-0-19-566526-0}}</ref>{{Request quotation|date=August 2021}}<ref name="kn2" /> The Mongols were defeated by [[Alauddin Khalji]] of the [[Delhi Sultanate]], and some of the Mongol soldiers remained in northern India after their conversion to Islam.<ref name="kn2">{{cite book|author=Iqtidar Alam Khan|title=Historical Dictionary of Medieval India|url=https://books.google.com/books?id=pzZFUcDpDzsC&pg=PA103|date=25 April 2008|publisher=Scarecrow Press|isbn=978-0-8108-5503-8|page=103}}</ref> It was written in the ''Tarikh-i Firishta'' (1606–1607) that the envoy of the Mongol ruler [[Hulagu Khan]] was presented with a [[pyrotechnics]] display upon his arrival in [[Delhi]] in 1258 CE.<ref name="khan 9 10">Khan, 9–10</ref> As a part of an embassy to India by [[Timur]]id leader Shah Rukh (1405–1447), 'Abd al-Razzaq mentioned naphtha-throwers mounted on elephants and a variety of pyrotechnics put on display.<ref name="GF2">Partington, 217</ref> Firearms known as ''top-o-tufak'' also existed in the [[Vijayanagara Empire]] by as early as 1366 CE.<ref name="khan 9 10" /> From then on the employment of [[gunpowder warfare]] in the region was prevalent, with events such as the siege of [[Belgaum]] in 1473 CE by the [[Sultan]] Muhammad Shah Bahmani.<ref name="khan 10">Khan, 10</ref> == Early Modern period (1527–1857 CE) == [[File:Jantar Mantar Delhi 27-05-2005.jpg|alt=|left|thumb|[[Jantar Mantar, New Delhi|Jantar Mantar, Delhi]]—consisting of 13 architectural astronomy instruments, built by [[Jai Singh II]] of Jaipur, from 1724 onwards.]]By the 16th century, [[South Asians]] were manufacturing a diverse variety of firearms; large guns in particular, became visible in [[Tanjore]], [[Dacca]], [[Adil Shahi|Bijapur]] and [[Murshidabad]].<ref name="GF3">Partington, 225</ref> Guns made of bronze were recovered from [[Kozhikode|Calicut]] (1504) and [[Diu, India|Diu]] (1533).<ref name="partingtonquote">Partington, 226</ref> [[Gujarāt]] supplied Europe saltpeter for use in gunpowder warfare during the 17th century.<ref name="IndiaBritannica">Encyclopædia Britannica (2008), ''India.''</ref> [[Bengal]] and [[Malwa|Mālwa]] participated in saltpeter production.<ref name="IndiaBritannica" /> The Dutch, French, Portuguese, and English used [[Chhapra]] as a center of saltpeter refining.<ref>Encyclopædia Britannica (2008), ''Chāpra.''</ref> In ''A History of Greek Fire and Gunpowder'', [[James Riddick Partington]] describes the gunpowder warfare of 16th and 17th century [[Mughal Empire|Mughal]] India, and writes that "Indian war rockets were good weapons before such rockets were used in Europe. They had bamboo rods, a rocket-body lashed to the rod, and iron points. They were directed at the target and fired by lighting the fuse, but the trajectory was rather erratic... The use of mines and counter-mines with explosive charges of gunpowder is mentioned for the times of Akbar and Jahāngir."<ref name="partingtonquote" /> The construction of water works and aspects of water technology in [[South Asia]] is described in [[Arabic]] and [[Persian language|Persian]] works.<ref name=Siddiqui/> During medieval times, the diffusion of [[South Asian]] and [[Iran|Persian]] irrigation technologies gave rise to an advanced irrigation system which bought about growth and also helped in the growth of material culture.<ref name=Siddiqui>Siddiqui, 52–77</ref> The founder of the [[cashmere wool]] industry is believed traditionally held to be the 15th-century ruler of Kashmir, Zayn-ul-Abidin, who introduced weavers from [[Central Asia]].<ref name=ebpasm/> The scholar Sadiq Isfahani of [[Jaunpur, Uttar Pradesh|Jaunpur]] compiled an [[atlas]] of the parts of the world which he held to be 'suitable for human life'.<ref name=Schwartzberg1302>Schwartzberg, 1302</ref> The 32 sheet atlas—with maps oriented towards the south as was the case with Islamic works of the era—is part of a larger scholarly work compiled by Isfahani during 1647 CE.<ref name=Schwartzberg1302/> According to Joseph E. Schwartzberg (2008): 'The largest known Indian map, depicting the former [[Rajput]] capital at [[Kingdom of Amber|Amber]] in remarkable house-by-house detail, measures 661 × 645&nbsp;cm.<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> (260 × 254 in., or approximately 22 × 21&nbsp;ft).'<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> The seamless [[celestial globe]] was invented in Kashmir by Ali Kashmiri ibn Luqman in 998 AH (1589–90 CE), and twenty other such [[globe]]s were later produced in [[Lahore]] and Kashmir during the [[Mughal Empire]].<ref name="Emilie">Savage-Smith (1985)</ref> These Indian metallurgists pioneered the method of [[lost-wax casting]] in order to produce these globes.<ref name="Emilie" /><ref name="voss">{{cite book |last=Roy |first=Tirthankar |title=The Ashgate Companion to the History of Textile Workers, 1650–2000 |publisher=[[Ashgate Publishing]] |year=2010 |isbn=978-0-7546-6428-4 |editor1=Lex Heerma van Voss |page=255 |chapter=The Long Globalization and Textile Producers in India |author-link=Tirthankar Roy |editor2=Els Hiemstra-Kuperus |editor3=Elise van Nederveen Meerkerk |chapter-url={{google books |plainurl=y |id=f95ljbhfjxIC|page=255}}}}</ref>[[File:NL-HaNA 1.11.01.01 1276 1R Brief van J.G. van Angelbeek, gouverneur van Ceylon, uit Cochin, aan de heer Decker, berichtend over de strijd tussen Tipoe en de vorst van Travancone. 1790 januari 14 (cropped).jpg|left|thumb|[[Mysorean rockets]]]] [[Hyder Ali]], prince of Mysore, developed war rockets with an important change: the use of metal cylinders to contain the combustion powder. Although the hammered soft iron he used was crude, the bursting strength of the container of black powder was much higher than the earlier paper construction. Thus a greater internal pressure was possible, with a resultant greater thrust of the propulsive jet. The rocket body was lashed with leather thongs to a long bamboo stick. Range was perhaps up to three-quarters of a mile (more than a kilometre). Although individually these rockets were not accurate, dispersion error became less important when large numbers were fired rapidly in mass attacks. They were particularly effective against cavalry and were hurled into the air, after lighting, or skimmed along the hard dry ground. Hyder Ali's son, [[Tipu Sultan]], continued to develop and expand the use of rocket weapons, reportedly increasing the number of rocket troops from 1,200 to a corps of 5,000. In battles at [[Seringapatam]] in 1792 and 1799 these rockets were used with considerable effect against the British. By the end of the 18th century the postal system in the region had reached high levels of efficiency.<ref name="Peabody1">Peabody, 71</ref> According to Thomas Broughton, the [[Maharaja]] of [[Jodhpur]] sent daily offerings of fresh flowers from his capital to Nathadvara (320&nbsp;km) and they arrived in time for the first religious [[Darśana|Darshan]] at sunrise.<ref name="Peabody1" /> Later this system underwent modernization with the establishment of the [[British Raj]].<ref name="Lowe" /> == Colonial era (1858–1947 CE) == <br /><div style="text-align: center;"><gallery widths="140" heights="140"> File:J.C.Bose.JPG|[[Jagadish Chandra Bose]] laid the foundations of experimental science in the [[Indian subcontinent]].<ref>Chatterjee, Santimay and Chatterjee, Enakshi, ''Satyendranath Bose'', 2002 reprint, p. 5, National Book Trust, {{ISBN|81-237-0492-5}}</ref> He is considered one of the fathers of radio science.<ref>{{cite conference|title=Sir J.C. Bose and radio science|last1=Sen|first1=A. K.|date=1997|publisher=IEEE|book-title=Microwave Symposium Digest|pages=557–560|location=Denver, CO|conference=IEEE MTT-S International Microwave Symposium|isbn=0-7803-3814-6|doi=10.1109/MWSYM.1997.602854}}</ref> File:IndianRailways1871b.jpg|Extent of the railway network in India in 1871; construction had begun in 1856. File:India railways1909a.jpg|The Indian railways network in 1909. File:SatyenBose1925.jpg|Physicist [[Satyendra Nath Bose]] is known for his work on the [[Bose–Einstein statistics]] during the 1920s. File:Sir CV Raman.JPG|[[C. V. Raman]], known for his research in the field of light scattering, also known as [[Raman scattering]]. </gallery> </div> The Post Office Act XVII of 1837 enabled the [[Governor-General of India]] to convey messages by post within the territories of the [[East India Company]].<ref name="Lowe" /> Mail was available to some officials without charge, which became a controversial privilege as the years passed.<ref name="Lowe" /> The Indian Post Office service was established on October 1, 1837.<ref name="Lowe">Lowe, 134</ref> The British also constructed a vast [[railway]] network in the region for both strategic and commercial reasons.<ref>Seaman, 348</ref> The British education system, aimed at producing able civil and administrative services candidates, exposed a number of Indians to foreign institutions.<ref name=Rajendran>Raja (2006)</ref> [[Sir Jagadis Chandra Bose|Jagadis Chandra Bose]] (1858–1937), [[Prafulla Chandra Ray]] (1861–1944), [[Satyendra Nath Bose]] (1894–1974), [[Meghnad Saha]] (1893–1956), [[P. C. Mahalanobis]] (1893–1972), [[C. V. Raman]] (1888–1970), [[Subrahmanyan Chandrasekhar]] (1910–1995), [[Homi J. Bhabha|Homi Bhabha]] (1909–1966), [[Srinivasa Ramanujan]] (1887–1920), [[Vikram Sarabhai]] (1919–1971), [[Har Gobind Khorana]] (1922–2011), [[Harish Chandra]] (1923–1983), [[Abdus Salam]] (1926–1996) and [[E. C. George Sudarshan]] (1933-2018) were among the notable scholars of this period.<ref name=Rajendran/> Extensive interaction between colonial and native sciences was seen during most of the colonial era.<ref name=Arnold211>Arnold, 211</ref> Western science came to be associated with the requirements of nation building rather than being viewed entirely as a colonial entity,<ref name=Arnold212/> especially as it continued to fuel necessities from agriculture to commerce.<ref name=Arnold211/> Scientists from India also appeared throughout Europe.<ref name=Arnold212>Arnold, 212</ref> By the time of India's independence colonial science had assumed importance within the westernized intelligentsia and establishment. French astronomer, Pierre Janssen observed the Solar eclipse of 18 August 1868 and discovered helium, from Guntur in Madras State, British India.<ref name=Arnold212/> == Post-Independence (1947 CE – present) == {{Main|Science and technology in India|Science and technology in Pakistan|Science and technology in Bangladesh}} ==See also== {{col div|colwidth=30em}} * [[List of Indian engineering colleges before Independence]] * [[List of Indian inventions and discoveries]] * [[Timeline of historic inventions]] * [[Timeline of Indian innovation]] * [[Science and technology in India]] ** [[Engineering education in India]] ** [[Information technology in India]] ** [[Science and technology studies in India]] ** [[Nalanda University]] {{colend}} ==Notes== {{reflist|3|refs= <ref name=":0">{{Cite book|title = An English Translation of the Sushruta Samhita, based on Original Sanskrit Text|last = Bhishagratna|first = Kunjalal|year = 1907|location = Calcutta|pages = 1|url = https://archive.org/stream/englishtranslati01susruoft#page/n103/mode/2up|ref = bhishagratna}}</ref> <ref name=History2010>{{cite book |veditors=Poretsky L |title=Principles of diabetes mellitus |year=2009 |publisher=Springer |location=New York|isbn=978-0-387-09840-1|page=3|url=https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |edition=2nd |url-status=live |archive-url=https://web.archive.org/web/20160404170919/https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |archive-date=2016-04-04}}</ref> }} ==References== * Allan, J. & Stern, S. M. (2008), ''coin'', Encyclopædia Britannica. * Allchin, F.R. (1979), ''South Asian Archaeology 1975: Papers from the Third International Conference of the Association of South Asian Archaeologists in Western Europe, Held in Paris'' edited by J.E.van Lohuizen-de Leeuw, Brill Academic Publishers, {{ISBN|90-04-05996-2}}. * Ahmad, S. (2005), "Rise and Decline of the Economy of Bengal", ''Asian Affairs'', '''27''' (3): 5–26. * Arnold, David (2004), ''[[The New Cambridge History of India]]: Science, Technology and Medicine in Colonial India'', Cambridge University Press, {{ISBN|0-521-56319-4}}. * Baber, Zaheer (1996), ''The Science of Empire: Scientific Knowledge, Civilization, and Colonial Rule in India'', State University of New York Press, {{ISBN|0-7914-2919-9}}. * Balasubramaniam, R. (2002), ''Delhi Iron Pillar: New Insights'', Indian Institute of Advanced Studies, {{ISBN|81-7305-223-9}}. * BBC (2006), [http://news.bbc.co.uk/2/hi/science/nature/4882968.stm "Stone age man used dentist drill"]. * Bourbaki, Nicolas (1998), ''Elements of the History of Mathematics'', Springer, {{ISBN|3-540-64767-8}}. * {{citation |first=C.B. |last=Boyer |author-link=Carl Benjamin Boyer |title=A History of Mathematics |edition=2nd |place=New York |publisher=Wiley |year=1991 |orig-year=1989 |isbn=978-0-471-54397-8 |url=https://archive.org/details/historyofmathema00boye}} * Broadbent, T. A. A. (1968), "Reviewed work(s): The History of Ancient Indian Mathematics by C. N. Srinivasiengar", ''The Mathematical Gazette'', '''52''' (381): 307–308. * {{Citation |last1=Bourbaki |first1=Nicolas |author-link=Nicolas Bourbaki |year=1998 |title=Elements of the History of Mathematics |publisher=Berlin, Heidelberg, and New York: [[Springer-Verlag]], 301 pages |isbn=978-3-540-64767-6 |url-access=registration |url=https://archive.org/details/elementsofhistor0000bour}}. * Ceccarelli, Marco (2000), ''International Symposium on History of Machines and Mechanisms: Proceedings HMM Symposium'', Springer, {{ISBN|0-7923-6372-8}}. * {{Cite book |last=Chattopadhyaya |first=Debiprasad |title=History of science and technology in ancient India: the beginnings |year=1986 |publisher=Firma KLM Pvt. Ltd |isbn=81-7102-053-4 |oclc=45345319}} * {{Cite book|last=Choudhury|first=Sarojakanta.|url=http://worldcat.org/oclc/224913142|title=Educational philosophy of Dr. Sarvepalli Radhakrishnan|date=2006|publisher=Deep & Deep Publications|isbn=81-7629-766-6|oclc=224913142}} * Chaudhuri, K. N. (1985), ''Trade and Civilisation in the Indian Ocean'', Cambridge University Press, {{ISBN|0-521-28542-9}}. * Craddock, P.T. etc. (1983), ''Zinc production in medieval India'', World Archaeology, '''15''' (2), Industrial Archaeology. * Cooke, Roger (2005), ''The History of Mathematics: A Brief Course'', Wiley-Interscience, {{ISBN|0-471-44459-6}}. * Coppa, A. etc. (2006), "Early neolithic tradition of dentistry", ''Nature'', '''440''': 755–756. * Dales, George (1974), "Excavations at Balakot, Pakistan, 1973", ''Journal of Field Archaeology'', '''1''' (1–2): 3–22 [10]. * Dhavalikar, M. K. (1975), "The beginning of coinage in India", ''World Archaeology'', '''6''' (3): 330–338, Taylor & Francis. * Dikshitar, V. R. R. (1993), ''The Mauryan Polity'', Motilal Banarsidass, {{ISBN|81-208-1023-6}}. * Drakonoff, I. M. (1991), ''Early Antiquity'', University of Chicago Press, {{ISBN|0-226-14465-8}}. * Fowler, David (1996), "Binomial Coefficient Function", ''The American Mathematical Monthly'', '''103''' (1): 1–17. * Finger, Stanley (2001), ''Origins of Neuroscience: A History of Explorations Into Brain Function'', Oxford University Press, {{ISBN|0-19-514694-8}}. * Ghosh, Amalananda (1990), ''An Encyclopaedia of Indian Archaeology'', Brill Academic Publishers, {{ISBN|90-04-09262-5}}. * Hayashi, Takao (2005), "Indian Mathematics", ''The Blackwell Companion to Hinduism'' edited by Gavin Flood, pp.&nbsp;360–375, Basil Blackwell, {{ISBN|978-1-4051-3251-0}}. * Hopkins, Donald R. (2002), ''The Greatest Killer: Smallpox in history'', University of Chicago Press, {{ISBN|0-226-35168-8}}. * Ifrah, Georges (2000), ''A Universal History of Numbers: From Prehistory to Computers'', Wiley, {{ISBN|0-471-39340-1}}. * Joseph, G. G. (2000), ''The Crest of the Peacock: The Non-European Roots of Mathematics'', Princeton University Press, {{ISBN|0-691-00659-8}}. * Kearns, Susannah C.J. & Nash, June E. (2008), ''leprosy'', Encyclopædia Britannica. * Kenoyer, J.M. (2006), "Neolithic Period", ''Encyclopedia of India (vol. 3)'' edited by Stanley Wolpert, Thomson Gale, {{ISBN|0-684-31352-9}}. * Khan, Iqtidar Alam (1996), ''Coming of Gunpowder to the Islamic World and North India: Spotlight on the Role of the Mongols'', Journal of Asian History '''30''': 41–5 . * Kieschnick, John (2003), ''The Impact of Buddhism on Chinese Material Culture'', Princeton University Press, {{ISBN|0-691-09676-7}}. * Kriger, Colleen E. & Connah, Graham (2006), ''Cloth in West African History'', Rowman Altamira, {{ISBN|0-7591-0422-0}}. * Lade, Arnie & Svoboda, Robert (2000), ''Chinese Medicine and Ayurveda'', Motilal Banarsidass, {{ISBN|81-208-1472-X}}. * Lal, R. (2001), "Thematic evolution of ISTRO: transition in scientific issues and research focus from 1955 to 2000", ''Soil and Tillage Research'', '''61''' (1–2): 3–12 [3]. * Lee, Sunggyu (2006), ''Encyclopedia of Chemical Processing'', CRC Press, {{ISBN|0-8247-5563-4}}. * Livingston, Morna & Beach, Milo (2002), ''Steps to Water: The Ancient Stepwells of India'', Princeton Architectural Press, {{ISBN|1-56898-324-7}}. * Lock, Stephen etc. (2001), ''The Oxford Illustrated Companion to Medicine'', Oxford University Press, {{ISBN|0-19-262950-6}}. * Lowe, Robson (1951), ''The Encyclopedia of British Empire Postage Stamps, 1661–1951 (vol. 3)''. * MSNBC (2008), [http://www.nbcnews.com/id/12168308 "Dig uncovers ancient roots of dentistry"]. * Nair, C.G.R. (2004), [http://www.kerala.gov.in/keralcallsep04/p22-24.pdf "Science and technology in free India"] {{Webarchive|url=https://web.archive.org/web/20060821195309/http://www.kerala.gov.in/keralcallsep04/p22-24.pdf |date=2006-08-21 }}, ''Government of Kerala—Kerala Call'', Retrieved on 2006-07-09. * O'Connor, J. J. & Robertson, E.F. (1996), [https://web.archive.org/web/20130120084848/http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Trigonometric_functions.html "Trigonometric functions"], ''[[MacTutor History of Mathematics Archive]]''. * O'Connor, J. J. & Robertson, E. F. (2000), [http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Paramesvara.html "Paramesvara"], ''[[MacTutor History of Mathematics archive]]''. * Partington, James Riddick & Hall, Bert S. (1999), ''A History of Greek Fire and Gunpowder'', Johns Hopkins University Press, {{ISBN|0-8018-5954-9}}. * Peabody, Norman (2003), ''Hindu Kingship and Polity in Precolonial India'', Cambridge University Press, {{ISBN|0-521-46548-6}}. * Peele, Stanton & Marcus Grant (1999), ''Alcohol and Pleasure: A Health Perspective'', Psychology Press, {{ISBN|1-58391-015-8}}. * Piercey, W. Douglas & Scarborough, Harold (2008), ''hospital'', Encyclopædia Britannica. * Pingree, David (2003), "The logic of non-Western science: mathematical discoveries in medieval India", ''Daedalus'', '''132''' (4): 45–54. * Raja, Rajendran (2006), "Scientists of Indian origin and their contributions", ''Encyclopedia of India (Vol 4.)'' edited by Stanley Wolpert, {{ISBN|0-684-31512-2}}. * Rao, S. R. (1985), ''Lothal'', Archaeological Survey of India. * Rodda & Ubertini (2004), ''The Basis of Civilization—Water Science?'', International Association of Hydrological Science, {{ISBN|1-901502-57-0}}. * Roy, Ranjan (1990), "Discovery of the Series Formula for <math> \pi </math> by Leibniz, Gregory, and Nilakantha", ''Mathematics Magazine'', Mathematical Association of America, '''63''' (5): 291–306. * Sanchez & Canton (2006), ''Microcontroller Programming: The Microchip PIC'', CRC Press, {{ISBN|0-8493-7189-9}}. * [[Savage-Smith, Emilie]] (1985), ''Islamicate Celestial Globes: Their History, Construction, and Use'', Smithsonian Institution Press, Washington, D.C. * Schwartzberg, Joseph E. (2008), "Maps and Mapmaking in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;1301–1303, Springer, {{ISBN|978-1-4020-4559-2}}. * Seaman, Lewis Charles Bernard (1973), ''Victorian England: Aspects of English and Imperial History 1837–1901'', Routledge, {{ISBN|0-415-04576-2}}. * Seidenberg, A. (1978), ''The origin of mathematics'', Archive for the history of Exact Sciences, '''18''': 301–342. * Sellwood, D. G. J. (2008), ''coin'', Encyclopædia Britannica. * Shaffer, Lynda N., "Southernization", ''Agricultural and Pastoral Societies in Ancient and Classical History'' edited by Michael Adas, pp.&nbsp;308–324, Temple University Press, {{ISBN|1-56639-832-0}}. * Sharpe, Peter (1998), ''[https://web.archive.org/web/20080518084734/http://www.siu.edu/~ebl/leaflets/sugar.htm Sugar Cane: Past and Present]'', Southern Illinois University. * Siddiqui, I. H. (1986), "Water Works and Irrigation System in India during Pre-Mughal Times", ''Journal of the Economic and Social History of the Orient'', '''29''' (1): 52–77. * Singh, A. N. (1936), "On the Use of Series in Hindu Mathematics", ''Osiris'', '''1''': 606–628. * Sircar, D.C.C. (1990), ''Studies in the Geography of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|81-208-0690-5}}. * Smith, David E. (1958). ''History of Mathematics''. Courier Dover Publications. {{ISBN|0-486-20430-8}}. * Srinivasan, S. & Griffiths, D., "South Indian wootz: evidence for high-carbon steel from crucibles from a newly identified site and preliminary comparisons with related finds", ''Material Issues in Art and Archaeology-V'', Materials Research Society Symposium Proceedings Series Vol. 462. * [https://web.archive.org/web/20181119033451/http://materials.iisc.ernet.in/~wootz/heritage/WOOTZ.htm Srinivasan, S. & Ranganathan, S., ''Wootz Steel: An Advanced Material of the Ancient World'', Bangalore: Indian Institute of Science.] * Srinivasan, S. (1994), "Wootz crucible steel: a newly discovered production site in South India", Institute of Archaeology, University College London, '''5''': 49–61. * Stein, Burton (1998), ''A History of India'', Blackwell Publishing, {{ISBN|0-631-20546-2}}. * Stillwell, John (2004), ''Mathematics and its History (2 edition)'', Springer, {{ISBN|0-387-95336-1}}. * Subbaarayappa, B.V. (1989), "Indian astronomy: an historical perspective", ''Cosmic Perspectives'' edited by Biswas etc., pp.&nbsp;25–41, Cambridge University Press, {{ISBN|0-521-34354-2}}. * Teresi, Dick etc. (2002), ''Lost Discoveries: The Ancient Roots of Modern Science—from the Babylonians to the Maya'', Simon & Schuster, {{ISBN|0-684-83718-8}}. * Tewari, Rakesh (2003), "The origins of Iron Working in India: New evidence from the central Ganga plain and the eastern Vindhyas", ''Antiquity'', '''77''' (297): 536–544. * Thrusfield, Michael (2007), ''Veterinary Epidemiology'', Blackwell Publishing, {{ISBN|1-4051-5627-9}}. * Tripathi, V.N. (2008), "Astrology in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;264–267, Springer, {{ISBN|978-1-4020-4559-2}}. * Wenk, Hans-Rudolf etc. (2003), ''Minerals: Their Constitution and Origin'', Cambridge University Press, {{ISBN|0-521-52958-1}}. * White, Lynn Townsend, Jr. (1960), "Tibet, India, and Malaya as Sources of Western Medieval Technology", ''The American Historical Review'' '''65''' (3): 522–526. * Whish, Charles (1835), ''Transactions of the Royal Asiatic Society of Great Britain and Ireland''. ==Further reading== *Alvares, Claude A. (1991) ''Decolonizing history: Technology and culture in India, China and the West 1492 to the Present Day'', New York, USA: Apex Press. [http://www.indianscience.org/essays/29-%20E--F-Decolonising%20History.pdf (review)] * Dharampal (1971) ''Indian Science and Technology in the Eighteenth Century: Some Contemporary European Accounts'' (with a foreword by Dr. D.S..Kothari and Introduction by Dr. William A.Blanpeid), Impex India, Delhi, 1971; reprinted by Academy of Gandhian Studies, Hyderabad 1983. * Anant Priolkar (1958) ''[https://archive.org/details/PrintingPressInIndia The printing press in India, its beginnings and early development; being a quarter-centenary commemoration study of the advent of printing in India] (in 1556).'' xix, 364 S., Bombay: Marathi Samshodhana Mandala, {{doi|10.1017/S0041977X00151158}} * [[Debiprasad Chattopadhyaya]] (1977) ''History of Science and Technology in Ancient India: The Beginnings'' with a foreword by Joseph Needham. * [[Project of History of Indian Science, Philosophy and culture]], Volume 4. Fundamental Indian Ideas in Physics, Chemistry, Life Sciences and Medicine * Project of History of Indian Science, Philosophy and Culture, Monograph series, Volume 3. Mathematics, Astronomy and Biology in Indian Tradition edited by D. P. Chattopadhyaya and Ravinder Kumar * [[T. A. Sarasvati Amma]] (2007)[1979] ''Geometry of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|978-81-208-1344-1}} * Shinde, V., Deshpande, S. S., Sarkar, A. (2016) ''Chalcolithic South Asia: Aspects of crafts and technologies'', Indus-Infinity Foundation *In Hāṇḍā, O. (2015) ''Reflections on the history of Indian science and technology'', New Delhi: Pentagon Press in association with Indus-Infinity Foundation. ==External links== {{Wikiquote}} *[https://web.archive.org/web/20181018060358/http://www.nscdelhi.org/exhibition-gallery.php?gallery=184 Our Science and Technology Heritage] gallery for the [[National Science Centre, Delhi|National Science Centre]] in Delhi * [http://www.iish.org/index.php?option=com_content&view=article&id=71:a-brief-introduction-to-technological-brilliance-of-ancient-india&catid=37:heritage-india-news&Itemid=56 A brief introduction to technological brilliance of Ancient India] (Indian Institute of Scientific Heritage) * [http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf Science and Technology in Ancient India] {{Webarchive|url=https://web.archive.org/web/20150501145738/http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf |date=2015-05-01 }} * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy. * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * [[Indian National Science Academy]] (2001), ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy, * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.1, January 2010, National Council of Science Museums, Kolkata, India, by S.M Khened, [https://web.archive.org/web/20110721162652/http://ncsm.gov.in/science_pdf/Shivaprasad%20Khened.pdf]. * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.2, July, 2010, pages 124–132, National Council of Science Museums, Kolkata, India, by S.M Khened,[https://web.archive.org/web/20110721161448/http://ncsm.gov.in/science_pdf/Propagation%20Vol%202%20-%2008%20Science%20Centres.pdf]. * ''History of Science in South Asia'' ([http://hssa-journal.org hssa-journal.org]). HSSA is a peer-reviewed, open-access, online journal for the history of science in India. {{Indianscience}} {{Science and technology in Pakistan}} {{History of science}} {{History of technology}} {{DEFAULTSORT:History Of Indian Science And Technology}}{{South Asian topics}} [[Category:History of science and technology in India| ]] [[Category:History of science and technology in Pakistan| ]] f870ca57858a68db92c8904a7345d224f5ba0682 Main Page 0 1 1 2024-03-13T19:08:51Z MediaWiki default 1 Welcome to Miraheze! wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phorge:|Phorge]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 070d9e6457eab136df99905438a1f57c037772b0 6 1 2024-03-14T11:05:01Z 92.40.190.103 0 wikitext text/x-wiki _ {{DISPLAYTITLE:Aryavartpedia}} <!-- Banner --> <div id="banner"> <!-- Your banner content goes here --> </div> <!-- Number of Articles --> <div id="article-count"> <p>Total Articles: {{NUMBEROFPAGES}}</p> </div> <!-- Feature Article --> <div id="feature-article"> <h2>Feature Article</h2> <p>Introductory paragraph...</p> <!-- Add the content of your feature article here --> </div> <!-- News from BBC --> <div id="bbc-news"> <h2>News from BBC</h2> <!-- Add code to fetch and display BBC news here --> </div> <!-- Famous People Birthdays --> <div id="birthdays"> <h2>Famous People Birthdays</h2> <!-- Add code to fetch and display famous people birthdays here --> </div> <!-- General Knowledge Facts --> <div id="general-facts"> <h2>General Knowledge Facts</h2> <!-- Add some interesting facts here --> </div> 9826e2aed1ba3de869d83357989b54af8f06dcef 9 6 2024-03-15T12:12:15Z Motzoid India 2 wikitext text/x-wiki {{DISPLAYTITLE:Aryavartpedia}} <!-- Banner --> <div id="banner"> <!-- Your banner content goes here --> </div> <!-- Number of Articles --> <div id="article-count"> <p>Total Articles: {{NUMBEROFPAGES}}</p> </div> <!-- Feature Article --> <div id="feature-article"> <h2>Feature Article</h2> <p>Introductory paragraph...</p> <!-- Add the content of your feature article here --> </div> <!-- News from BBC --> <div id="bbc-news"> <h2>News from BBC</h2> <!-- Add code to fetch and display BBC news here --> </div> <!-- Famous People Birthdays --> <div id="birthdays"> <h2>Famous People Birthdays</h2> <!-- Add code to fetch and display famous people birthdays here --> </div> <!-- General Knowledge Facts --> <div id="general-facts"> <h2>General Knowledge Facts</h2> <!-- Add some interesting facts here --> </div> 60c1b05e6cf8a58ddb4422f79c44c428574f7be5 Ganesha 0 2 2 2024-03-13T19:43:26Z Motzoid India 2 Created page with "'''Ganesh''' or '''Ganesha''' is an Hindu Deity and one of the best known and worshipped deity in Hinduism. Every Hindu Denomination worships Ganesh regardless of the affiliation." wikitext text/x-wiki '''Ganesh''' or '''Ganesha''' is an Hindu Deity and one of the best known and worshipped deity in Hinduism. Every Hindu Denomination worships Ganesh regardless of the affiliation. 06f80047a9e6193c8cd7403b8fd55f5ddc3af756 India 0 3 3 2024-03-13T21:19:42Z 80.5.18.102 0 Created page with "'''India''', officially the '''Republic of India''' (ISO: ''Bhārat Gaṇarājya''), is a country in South Asia. It is the seventh-largest country by area; the most populous country as of June 2023; and from the time of its independence in 1947, the world's most populous democracy. Bounded by the Indian Ocean on the south, the Arabian Sea on the southwest, and the Bay of Bengal on the southeast, it shares land borders with Pakistan to the west;China, Nepal, and Bhutan to..." wikitext text/x-wiki '''India''', officially the '''Republic of India''' (ISO: ''Bhārat Gaṇarājya''), is a country in South Asia. It is the seventh-largest country by area; the most populous country as of June 2023; and from the time of its independence in 1947, the world's most populous democracy. Bounded by the Indian Ocean on the south, the Arabian Sea on the southwest, and the Bay of Bengal on the southeast, it shares land borders with Pakistan to the west;China, Nepal, and Bhutan to the north; and Bangladesh and Myanmar to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; its Andaman and Nicobar Islands share a maritime border with Thailand, Myanmar, and Indonesia. Modern humans arrived on the Indian subcontinent from Africa no later than 55,000 years ago. Their long occupation, initially in varying forms of isolation as hunter-gatherers, has made the region highly diverse, second only to Africa in human genetic diversity. Settled lifeemerged on the subcontinent in the western margins of the Indus river basin 9,000 years ago, evolving gradually into the Indus Valley Civilisation of the third millennium BCE.By 1200 BCE, an archaic form of Sanskrit, an Indo-European language, had diffusedinto India from the northwest. Its evidence today is found in the hymns of the ''Rigveda''. Preserved by an oral tradition that was resolutely vigilant, the ''Rigveda''records the dawning of Hinduism in India. The Dravidian languages of India were supplanted in the northern and western regions. By 400 BCE, stratification and exclusion by caste had emerged within Hinduism, and Buddhism and Jainism had arisen, proclaiming social orders unlinked to heredity. Early political consolidations gave rise to the loose-knit Maurya and Gupta Empires based in the Ganges Basin. Their collective era was suffused with wide-ranging creativity, but also marked by the declining status of women, and the incorporation of untouchability into an organised system of belief. In South India, the Middle kingdoms exported Dravidian-languages scripts and religious cultures to the kingdoms of Southeast Asia. caa048d6c69ad4c588297d1cdce58bc0c7c88bbf 4 3 2024-03-13T21:24:57Z 80.5.18.102 0 wikitext text/x-wiki '''India''', officially the '''Republic of India''' (ISO: ''Bhārat Gaṇarājya''), is a country in South Asia. It is the seventh-largest country by area; the most populous country as of June 2023; and from the time of its independence in 1947, the world's most populous democracy. Bounded by the Indian Ocean on the south, the Arabian Sea on the southwest, and the Bay of Bengal on the southeast, it shares land borders with Pakistan to the west;China, Nepal, and Bhutan to the north; and Bangladesh and Myanmar to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; its Andaman and Nicobar Islands share a maritime border with Thailand, Myanmar, and Indonesia. Modern humans arrived on the Indian subcontinent from Africa no later than 55,000 years ago. Their long occupation, initially in varying forms of isolation as hunter-gatherers, has made the region highly diverse, second only to Africa in human genetic diversity. Settled lifeemerged on the subcontinent in the western margins of the Indus river basin 9,000 years ago, evolving gradually into the Indus Valley Civilisation of the third millennium BCE.By 1200 BCE, an archaic form of Sanskrit, an Indo-European language, had diffusedinto India from the northwest. Its evidence today is found in the hymns of the ''Rigveda''. Preserved by an oral tradition that was resolutely vigilant, the ''Rigveda''records the dawning of Hinduism in India. The Dravidian languages of India were supplanted in the northern and western regions. By 400 BCE, stratification and exclusion by caste had emerged within Hinduism, and Buddhism and Jainism had arisen, proclaiming social orders unlinked to heredity. Early political consolidations gave rise to the loose-knit Maurya and Gupta Empires based in the Ganges Basin. Their collective era was suffused with wide-ranging creativity, but also marked by the declining status of women, and the incorporation of untouchability into an organised system of belief. In South India, the Middle kingdoms exported Dravidian-languages scripts and religious cultures to the kingdoms of Southeast Asia. == Etymology == The name "India" is derived from the River Indus, which flows through the northwest of the country. The ancient Greeks referred to the region as "Indoi," which eventually evolved into "India." == History == === Prehistoric Period === India has a rich history spanning thousands of years. The earliest known human settlements in the Indian subcontinent date back to the Paleolithic Age, around 400,000 years ago. Evidence of early human activity has been found in various archaeological sites across the country, including the Bhimbetka rock shelters in Madhya Pradesh. === Indus Valley Civilization === One of the world's oldest civilizations, the Indus Valley Civilization (c. 3300–1300 BCE), flourished in the northwestern region of the Indian subcontinent. Excavations at sites such as Harappa, Mohenjo-Daro, and Lothal have revealed sophisticated urban planning, advanced drainage systems, and intricate artwork, indicating a highly developed ancient society. === Vedic Period === Around 1500 BCE, Indo-Aryan tribes migrated into the Indian subcontinent, bringing with them the Vedic culture and language. The Vedic texts, including the Rigveda and the Upanishads, provide insights into the early religious and social practices of ancient India. The caste system, which divided society into distinct social classes, emerged during this period. === Maurya and Gupta Empires === In the first millennium BCE, several powerful kingdoms and empires rose and fell across the Indian subcontinent. The Maurya Empire (c. 322–185 BCE), under the rule of Chandragupta Maurya and his grandson Ashoka the Great, unified much of the Indian subcontinent and promoted Buddhism. The Gupta Empire (c. 320–550 CE) is often referred to as the "Golden Age" of India, marked by significant advancements in art, science, mathematics, and literature. === Medieval Period === From the 8th to the 16th centuries, India witnessed the rise and fall of various dynasties, including the Chola, Chalukya, Rashtrakuta, and Vijayanagara empires in the south, and the Delhi Sultanate and Mughal Empire in the north. These periods saw significant cultural exchanges, architectural marvels such as the Taj Mahal, and the spread of Islam across the Indian subcontinent. === Colonial Era === The arrival of European traders, starting with the Portuguese in the late 15th century, marked the beginning of European colonialism in India. The British East India Company gradually expanded its influence, culminating in the establishment of British colonial rule by the mid-19th century. India became the "Jewel in the Crown" of the British Empire, enduring centuries of exploitation, economic drain, and social upheaval. === Indian Independence Movement === The struggle for independence from British rule gained momentum in the late 19th and early 20th centuries, led by figures such as Mahatma Gandhi, Jawaharlal Nehru, and Subhas Chandra Bose. The nonviolent civil disobedience campaigns, such as the Salt March and Quit India Movement, played a crucial role in India's eventual independence in 1947. === Post-Independence === India was partitioned upon independence, resulting in the creation of two separate nations, India and Pakistan. The partition led to widespread violence and the displacement of millions of people. India adopted a democratic constitution, becoming a sovereign republic on January 26, 1950. The country has since made significant strides in various fields, including agriculture, industry, technology, and space exploration. === Geography and Climate === India is a vast country with diverse geographical features, including the Himalayas in the north, fertile plains of the Ganges and Indus rivers, Thar Desert in the west, and dense forests in the central and southern regions. The country experiences a wide range of climates, from tropical in the south to temperate in the north, with monsoon rains playing a crucial role in the agricultural economy. === Demographics === India is home to a diverse population comprising various ethnicities, languages, religions, and cultures. The country's official language is Hindi, while English is also widely used for official and administrative purposes. Hinduism is the predominant religion, followed by Islam, Christianity, Sikhism, Buddhism, and Jainism. === Economy === India has emerged as one of the world's fastest-growing major economies, driven by sectors such as information technology, telecommunications, manufacturing, and agriculture. The country is also known for its vibrant startup ecosystem and is home to several multinational corporations. However, India faces challenges such as poverty, income inequality, and environmental degradation. === Culture === Indian culture is characterized by its diversity, influenced by centuries of interactions with various civilizations and cultures. The country's cultural heritage encompasses art, music, dance, cuisine, festivals, and traditional practices. Indian classical music, dance forms such as Bharatanatyam and Kathak, and festivals like Diwali and Holi are celebrated worldwide. India's rich history, cultural heritage, and remarkable journey from ancient civilizations to a modern nation make it a fascinating and dynamic country. With its vast landscapes, diverse demographics, and vibrant culture, India continues to captivate the world and inspire generations across the globe. 3e76a294de9256063abdb0eb53d6e258b764b3f9 Dhumik Pravin 0 4 5 2024-03-14T10:58:33Z 92.40.190.103 0 Created page with "'''Dhumik Pravin''' (18 February 2007), is an Indian YouTuber and music producer who is the founder of the Motzoid India which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati Hindu Family in Diu. In 2014, Dhumik and his family moved to Leicester, UK for a better future. He started his junior education at Bridge Junior school and after went..." wikitext text/x-wiki '''Dhumik Pravin''' (18 February 2007), is an Indian YouTuber and music producer who is the founder of the Motzoid India which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati Hindu Family in Diu. In 2014, Dhumik and his family moved to Leicester, UK for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. 950b40590a5ea1912625929beec7019490d28f30 10 5 2024-03-15T12:29:19Z Motzoid India 2 wikitext text/x-wiki '''Dhumik Pravin''' (18 February 2007), is an [[India|Indian]] [[YouTuber]] and [[music producer]] who is the founder of [[Motzoid India]] which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati [[Hindu]] Family in [[Diu]]. In 2014, Dhumik and his family moved to [[Leicester]], [[UK]] for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. a44edd2d1773249cd668bc25e5dd7cf349c0bf2d Template:Infobox person/doc 10 563 1146 2024-03-14T23:52:57Z Infobox-person>SWinxy 0 /* See also */ Mention template dependencies wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}{{pp-move-indef}}</noinclude>{{for|an infobox for fictional characters|Template:Infobox character}} {{Template shortcut|Personbox}} {{documentation subpage}} {{Person infobox header}} {{High-use|info=About [https://linkcount.toolforge.org/index.php?project=en.wikipedia.org&page=Template:Infobox_person&namespaces=0 410,000] of them (90%) are in mainspace.}} {{Notice|Please note that in 2016, the {{para|religion}} and {{para|ethnicity}} parameters were removed from Infobox person as a result of [[Wikipedia:Village pump (policy)/Archive 126#RfC: Religion in biographical infoboxes|the RfC: Religion in biographical infoboxes]] and [[Wikipedia:Village pump (policy)/Archive 127#RfC: Ethnicity in infoboxes|the RfC: Ethnicity in infoboxes]] as clarified by [[Template talk:Infobox person/Archive 31#Ethnicity? Religion?|this discussion]].}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters|Module:Check for clobbered parameters}} {{Tracks Wikidata|P18|cat=No local image but image on Wikidata}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> {{tl|Infobox person}} may be used to summarize information about a particular person, usually at the top of an article. == Redirects and calls == At least {{PAGESINCATEGORY:Templates calling Infobox person}} other [[:Category:Templates calling Infobox person|templates call this one]] and many templates [{{fullurl:Special:WhatLinksHere/Template:Infobox_person|namespace=10&hidetrans=1&hidelinks=1}} redirect here]. == Modules == The following templates are suitable for use as a "module" in this one: * Templates in [[:Category:Biographical templates usable as a module]] * {{tl|Listen}} * {{tl|Infobox Chinese}} == Usage == The infobox may be added by pasting the template as shown below into an article and then filling in the desired fields. Any parameters left blank or omitted will not be displayed. === Blank template with basic parameters === {{Infobox person | name = ''name'' | image = example-serious.jpg | alt = alt | caption = ''caption'' | birth_name = ''birth_name'' | birth_date = ''birth_date'' | birth_place = ''birth_place'' | death_date = ''death_date'' | death_place = ''death_place'' | nationality = ''nationality'' | other_names = ''other_names'' | occupation = ''occupation'' | years_active = ''years_active'' | known_for = ''known_for'' | notable_works = ''notable_works'' }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em;"> {{Infobox person | name = <!-- defaults to article title when left blank --> | image = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] --> | alt = <!-- descriptive text for use by speech synthesis (text-to-speech) software --> | caption = | birth_name = <!-- only use if different from name --> | birth_date = <!-- {{Birth date and age|YYYY|MM|DD}} for living people supply only the year with {{Birth year and age|YYYY}} unless the exact date is already widely published, as per [[WP:DOB]]. For people who have died, use {{Birth date|YYYY|MM|DD}}. --> | birth_place = | death_date = <!-- {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (DEATH date then BIRTH date) --> | death_place = | nationality = <!-- use only when necessary per [[WP:INFONAT]] --> | other_names = | occupation = | years_active = | known_for = | notable_works = }} </syntaxhighlight> {{Infobox person | name = ''name'' | image = example-serious.jpg | alt = alt | caption = ''caption'' | birth_name = ''birth_name'' | birth_date = ''birth_date'' | birth_place = ''birth_place'' | death_date = ''death_date'' | death_place = ''death_place'' | nationality = ''nationality'' | other_names = ''other_names'' | occupation = ''occupation'' | years_active = ''years_active'' | known_for = ''known_for'' | notable_works = ''notable_works'' }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em;"> {{Infobox person | name = | image = | alt = | caption = | birth_name = | birth_date = | birth_place = | death_date = | death_place = | nationality = | other_names = | occupation = | years_active = | known_for = | notable_works = }} </syntaxhighlight> {{clear}} === Blank template with all parameters === Only the most pertinent information should be included. Please {{em|remove}} unused parameters, and refrain from inserting dubious trivia in an attempt to fill all parameters. {{Parameter names example | _display=italics | honorific_prefix | name | honorific_suffix | image=example-serious.jpg | image_upright=1 | landscape | alt | caption <!--shows placement of parameters, see examples for image--> | native_name | native_name_lang | pronunciation | birth_name | birth_date | birth_place | baptised <!--does not display due to birth date displayed--> | disappeared_date | disappeared_place | disappeared_status | death_date | death_place | death_cause <!--should only be included when the cause of death has significance for the subject's notability--> | body_discovered | resting_place | resting_place_coordinates | monuments | nationality | other_names | siglum | citizenship | education | alma_mater | occupation | years_active | era | employer | organization | agent | known_for | notable_works | style | height | television | title | term | predecessor | successor | party | otherparty | movement | opponents | boards | criminal_charges | criminal_penalty | criminal_status | spouse | partner | children | parents | relatives | family | callsign | awards | website | module | module2 | module3 | module4 | module5 | module6 <!--removed the ... which only saved two lines from being shown--> | signature=<nowiki>signature.jpg</nowiki> |signature_type | signature_size | signature_alt | footnotes }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em"> {{Infobox person | honorific_prefix = | name = <!-- defaults to article title when left blank --> | honorific_suffix = | image = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] --> | image_upright = | landscape = <!-- yes, if wide image, otherwise leave blank --> | alt = <!-- descriptive text for use by speech synthesis (text-to-speech) software --> | caption = | native_name = | native_name_lang = | pronunciation = | birth_name = <!-- only use if different from name --> | birth_date = <!-- {{Birth date and age|YYYY|MM|DD}} for living people supply only the year with {{Birth year and age|YYYY}} unless the exact date is already widely published, as per [[WP:DOB]]. For people who have died, use {{Birth date|YYYY|MM|DD}}. --> | birth_place = | baptised = <!-- will not display if birth_date is entered --> | disappeared_date = <!-- {{Disappeared date and age|YYYY|MM|DD|YYYY|MM|DD}} (disappeared date then birth date) --> | disappeared_place = | disappeared_status = | death_date = <!-- {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (enter DEATH date then BIRTH date (e.g., ...|1967|8|31|1908|2|28}} use both this parameter and |birth_date to display the person's date of birth, date of death, and age at death) --> | death_place = | death_cause = <!-- should only be included when the cause of death has significance for the subject's notability --> | body_discovered = | resting_place = | resting_place_coordinates = <!-- {{coord|LAT|LONG|type:landmark|display=inline}} --> | burial_place = <!-- may be used instead of resting_place and resting_place_coordinates (displays "Burial place" as label) --> | burial_coordinates = <!-- {{coord|LAT|LONG|type:landmark|display=inline}} --> | monuments = | nationality = <!-- use only when necessary per [[WP:INFONAT]] --> | other_names = | siglum = | citizenship = <!-- use only when necessary per [[WP:INFONAT]] --> | education = | alma_mater = | occupation = | years_active = | era = | employer = | organization = | agent = <!-- discouraged in most cases, specifically when promotional, and requiring a reliable source --> | known_for = | notable_works = <!-- produces label "Notable work"; may be overridden by |credits=, which produces label "Notable credit(s)"; or by |works=, which produces label "Works"; or by |label_name=, which produces label "Label(s)" --> | style = | height = <!-- "X cm", "X m" or "X ft Y in" plus optional reference (conversions are automatic) --> | television = | title = <!-- formal/awarded/job title. The parameter |office=may be used as an alternative when the label is better rendered as "Office" (e.g. public office or appointments) --> | term = | predecessor = | successor = | party = | otherparty = | movement = | opponents = | boards = | criminal_charges = <!-- criminality parameters should be supported with citations from reliable sources --> | criminal_penalty = | criminal_status = | spouse = <!-- use article title or common name --> | partner = <!-- (unmarried long-term partner) --> | children = | parents = <!-- overrides mother and father parameters --> | mother = <!-- may be used (optionally with father parameter) in place of parents parameter (displays "Parent(s)" as label) --> | father = <!-- may be used (optionally with mother parameter) in place of parents parameter (displays "Parent(s)" as label) --> | relatives = | family = | callsign = <!-- amateur radio, use if relevant --> | awards = | website = <!-- {{URL|example.com}} --> | module = | module2 = | module3 = | module4 = | module5 = | module6 = | signature = | signature_type = | signature_size = | signature_alt = | footnotes = }} </syntaxhighlight> <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em"> {{Infobox person | honorific_prefix = | name = | honorific_suffix = | image = | image_upright = | landscape = | alt = | caption = | native_name = | native_name_lang = | pronunciation = | birth_name = | birth_date = | birth_place = | baptised = | disappeared_date = | disappeared_place = | disappeared_status = | death_date = | death_place = | death_cause = | body_discovered = | resting_place = | resting_place_coordinates = | burial_place = | burial_coordinates = | monuments = | nationality = | other_names = | siglum = | citizenship = | education = | alma_mater = | occupation = | years_active = | era = | employer = | organization = | agent = | known_for = | notable_works = | style = | height = | television = | title = | term = | predecessor = | successor = | party = | otherparty = | movement = | opponents = | boards = | criminal_charges = | criminal_penalty = | criminal_status = | spouse = | partner = | children = | parents = | mother = | father = | relatives = | family = | callsign = | awards = | website = | module = | module2 = | module3 = | module4 = | module5 = | module6 = | signature = | signature_type = | signature_size = | signature_alt = | footnotes = }} </syntaxhighlight> {{clear}} == Parameters == {{large|Do not use all these parameters for any one person. The list is long to cover a wide range of people. Only use those parameters that convey essential or notable information about the subject, and ensure that this information is sourced in the article or (if present only in the infobox) in the infobox itself}} Any parameters left blank or omitted will not be displayed. Many parameters have alternative names, implemented for compatibility with other templates (especially to aid merging). The preferred names are shown in the table below. {| class="wikitable" ! Parameter ! Explanation |- | {{mono|honorific_prefix}} | To appear on the line above the person's name. This is for honorifics of serious significance that are attached to the name in formal address, such as knighthoods, "The Honourable", and "His/Her Excellency"; do not use it for routine things like "{{!mxt|[[Dr.]]}}" or "{{!mxt|[[Ms.]]}}" |- | {{mono|name}} | Common name of person (defaults to article name if left blank; provide {{para|birth_name}} (below) if different from {{para|name}}). If middle initials are specified (or implied) by the lead of the article, and are not specified separately in the {{para|birth_name}} parameter, include them here. ''Do not put honorifics or alternative names in this parameter.'' There are separate parameters for these things, covered below. |- | {{mono|honorific_suffix}} | To appear on the line below the person's name. This is for things like {{para|honorific_suffix|[[Officer of the Order of the British Empire|OBE]]}} – honorifics of serious significance that are attached to the name in formal address, such as national orders and non-honorary doctorates; do not use it for routine things like "{{!mxt|[[Bachelor of Arts|BA]]}}". It is permissible but not required to use the {{tlx|post-nominals}} template inside this parameter; doing so requires {{tlx|post-nominals|size{{=}}100%|...}}. |- | {{mono|image}} | Image name: {{pval|abc.jpg}}, {{pval|xpz.png}}, {{pval|123.gif}}, etc., without the {{code|File:}} or {{code|Image:}} prefix. If an image is desired but not available, one may add {{pval|yes}} to the {{para|needs-photo}} parameter of the {{tlx|WikiProject Biography}} template on the talk page. If no image is available yet, [[Wikipedia:Centralized discussion/Image placeholders|do not use an image placeholder]]. See [[#Image]] for further guidelines. |- | {{mono|image_upright}} | Scales the image thumbnail from its default size by the given factor. Values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | {{mono|landscape}} | Set to <code>yes</code> when using wide, short images. The image height (rather than width) will be limited to 200 pixels. |- | {{mono|alt}} | Descriptive [[Wikipedia:Manual of Style/Accessibility/Alternative text for images|{{code|alt}} text for the image]], for visually impaired readers. One word (such as {{pval|photograph}}) is rarely sufficient. Do not copy-paste the value of {{para|caption}} (below) into this parameter. Example of the difference: "Willie Nelson at a concert in Dallas, 1989" is good as {{para|caption}} value; "Nelson in western-wear with an acoustic guitar, on stage in a daytime show with band in background" is an {{para|alt}} description. If nothing meaningful can be said that isn't already in the caption, use the [[Wikipedia:Manual of Style/Accessibility/Alternative text for images#Captions and nearby text|stock text]] {{para|alt|refer to caption}}. |- | {{mono|caption}} | Caption for image, if needed. Try to include the date of photo, some context (check the <code>File:</code> or [[Wikimedia Commons|Commons]] page for the image). Image credit should generally not be included per [[MOS:CREDITS]]. |- | {{mono|native_name}} | The person's name in their own language, if different. |- | {{mono|native_name_lang}} | [[ISO 639-1]] code, e.g., "{{pval|fr}}" for French. If more than one, use {{tlx|lang}} around each name in {{para|native_name}} instead. |- | {{mono|pronunciation}} | Details of how to pronounce the individual's native name. <!--copied from TemplateData description, if changed please update there also--> |- | {{mono|birth_name}} | Name at birth; only use if different from {{para|name}}. |- | {{mono|birth_date}} | Date of birth: Use {{tlx|birth date and age}} (if living) or {{tlx|birth date}} (if dead). {{crossref|See template's page for details on usage.}} If only a year of birth is known, or age as of a certain date, consider using {{tlx|birth year and age}} or {{tlx|birth based on age as of date}}. For living people [[Wikipedia:Biographies of living persons#Privacy of personal information and using primary sources|supply only the year unless the exact date is already widely published]]. Treat such cases as if only the year is known, so use {{tlx|birth year and age}} or a similar option. The templates mentioned in this paragraph emit metadata indicating the date is in the Gregorian calendar; if the date is in the Julian calendar, do not use these templates, just write the date. |- | {{mono|{{vanchor|birth_place}}}} | Place of birth: {{var|city}}, {{var|administrative region}}, {{var|country}}. * Use the name of the birthplace at the time of birth, e.g.: {{pval|Saigon}} (prior to 1976) or {{pval|Ho Chi Minh City}} (post-1976). * [[Wikipedia:Manual of Style/Icons#Do not use flags to indicate locations of birth, residence, or death|Do not use a flag template]], coat of arms, or other icon. * [[Wikipedia:Manual of Style/Infoboxes#Purpose|Omit unnecessary or redundant details]]. For example, it is not necessary to state: {{!xt|{{pval|New York City, [[New York (state)|New York]], United States}}}} when {{xt|{{pval|New York City, U.S.}}}} conveys essentially the same information more concisely. * Countries should [[Wikipedia:Manual of Style/Linking#What generally should not be linked|generally not be linked]]. * For modern subjects, the country should generally be a sovereign state; for United Kingdom locations, the constituent [[Countries of the United Kingdom|countries of the UK]] are sometimes used instead, when more appropriate in the context. * For historical subjects, use the place name most appropriate for the context and our readership. What the place may correspond to on a modern map is a matter for an article's main text. * For union republics, subordinate country can be shown: {{!xt|{{pval|Moscow, [[Russian SFSR]], Soviet Union}}}}. * For subsequent places (of death, etc.) it is not necessary to repeat jurisdictional details or links for the same place name. |- | {{mono|baptised}} | Date of baptism: {{em|Only}} for use when birth date is not known (e.g., for [[Ludwig van Beethoven]]). Will not display if a birth date is entered. Do not use subtemplates. Parameter <code>baptized</code> can be used for articles that use American English spelling. |- | {{mono|disappeared_date}} | (For missing people) Date of disappearance: Use {{tlx|disappeared date and age}} (if birth date is known) or {{tlx|disappeared date}} (if birth date unknown). |- | {{mono|disappeared_place}} | (For missing people) Place of disappearance: {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp;<!--This space is needed for readability, due to quirk of these templated elements being in proximity.--> ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|disappeared_status}} | (For missing people) Current status for the person, e.g., if the person is still regarded as missing (using {{tlx|missing for}} to calculate the time since disappearance), or if the person has been [[Declared death in absentia|declared dead ''{{lang|la|in absentia}}'']], with a date for such a ruling. |- | {{mono|death_date}} | Date of death: Use {{tlx|death date and age}} (if birth date is known) or {{tlx|death date}} (if birth date unknown). {{crossref|See template's page for details on usage.}} If exact dates are unknown, consider using {{tlx|death year and age}}. The templates mentioned in this paragraph emit metadata indicating the date is in the Gregorian calendar; if the date is in the Julian calendar, do not use these templates, just write the date. |- | {{mono|death_place}} | Place of death: {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|death_cause}} | Cause of death. Should be clearly defined and sourced, and should only be included when the cause of death has significance for the subject's notability, e.g. [[James Dean]], [[John Lennon]]. It should not be filled in for unremarkable deaths such as those from old age or routine illness, e.g. [[Bruce Forsyth]], [[Eduard Khil]]. |- | {{mono|body_discovered}} | Place where the body was discovered (if different from place of death). {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|burial_place}} | Place of burial {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc. {{crossref|See {{para|resting_place}} for non-burials}}.) |- | {{mono|burial_coordinates}} | Coordinates for place of burial, to accompany {{para|burial_place}}. Use {{tlx|coord}} template. |- | {{mono|resting_place}} | Location of columbarium, ash-scattering, etc. If no location, leave blank. {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|resting_place_coordinates}} | Coordinates for location of columbarium, ash-scattering etc. Use {{tlx|coord}} template. |- | {{mono|monuments}} | Significant monuments erected, buildings named, etc., in honour of the subject. If many, link to an appropriate section of the article instead. |- | {{mono|nationality}} | {{anchor|nationality}}May be used instead of {{para|citizenship}} (below) or vice versa in cases where any confusion could result. Should only be used {{em|with}} {{para|citizenship}} when they differ per [[WP:INFONAT]]. Do not put religion or ethnicity in this field. ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, anachronisms, "country" definitions, etc.) |- | {{mono|other_names}} | Other notable names for the person, if different from {{para|name}} and {{para|birth_name}}. [[Wikipedia:Manual of Style/Biographies#Pseudonyms|This can include]] stage names, maiden/married names, nicknames, criminal aliases, etc. |- | {{mono|siglum}} | [[Siglum]] or monogram, a text shortcut (often formed from the initials of the name, with variations) used to sign work, if relevant. |- | {{mono|citizenship}} | Country of legal citizenship, if different from nationality. Rarely needed. See usage notes for {{para|nationality}}, above. Should only be used if citizenship differs from the value in {{para|nationality}} and cannot be inferred from the birthplace. Note that many countries do not automatically grant citizenship to people born within their borders. Do not put religion or ethnicity in this field. ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, anachronisms, "country" definitions, etc.) |- | {{mono|education}} | Education, e.g., degree, institution and graduation year, if relevant. If very little information is available or relevant, the {{para|alma_mater}} parameter may be more appropriate. |- | {{mono|alma_mater}} | ''[[Alma mater]]''. This parameter is a more concise alternative to (not addition to) {{para|education}}, and will often consist of the linked name of the last-attended institution of higher education (not secondary schools). It is usually not relevant to include either parameter for non-graduates, but article talk page consensus may conclude otherwise, as perhaps at [[Bill Gates]]. |- | {{mono|occupation}} | Occupation(s) as given in the lead. Use list markup for three or more entries, e.g. with {{tlx|flatlist}}. Please observe [[sentence case]] and capitalise only the first letter of the first item; e.g.: {{block indent|1={{Flatlist| * Musician * singer-songwriter * actor }}}} |- | {{mono|years_active}} | Date range in years during which the subject was active in their principal occupation(s) and/or other activity for which they are notable. Use the format {{code|1950–2000}}, or {{code|1970–present}} if still active. [[Wikipedia:Manual of Style/Dates and numbers#Ranges|Date ranges]] always use an [[Wikipedia:Manual of Style#En dashes|en dash]], not hyphen. If no dates of birth and/or death are known for the subject, only a ''[[floruit]]'' date range, as is common with ancient subjects, this parameter can be used for it. If approximate (''[[wikt:circa#English|circa]]'') dates are known for either or both, put them in the {{para|birth_date}} and {{para|death_date}} parameters. Helpful templates: {{tlx|floruit}}, {{tlx|circa}}. |- | {{mono|era}} | Era (e.g., {{pval|Medieval}}) in which the person lived; less specific than {{para|years_active}}. Should not be used if dates are available. |- | {{mono|employer}} | Employer(s), if relevant. |- | {{mono|organization}} or {{mono|organisation}} | Non-employing organization(s), if relevant. |- | {{mono|agent}} | The subject's agent (individual and/or agency), discouraged in most cases, specifically when promotional, and requiring a [[Wikipedia:Identifying reliable sources|reliable source]]. |- | {{mono|known_for}} | A brief description of why the person is notable. |- | {{ubl|{{mono|notable_works}};<br/>&nbsp;&nbsp;{{small|alternatives:}} |{{mono|credits}} |{{mono|label_name}} |{{mono|works}} }} | Title(s) of notable work(s) (publications, compositions, sculptures, films, etc.) by the subject, if any. Produces the label '''Notable work'''. May be overridden by {{para|credits}}, which produces '''Notable credit(s)'''; or by {{para|works}}, which produces '''Works'''; or by {{para|label_name}}, which produces '''Label(s)'''. * The {{para|notable_works}}, {{para|credits}}, and {{para|label_name}} parameters are intended to be (at most) short [[#Inline lists|inline lists]]. * The {{para|label_name}} variant is used for one or more record labels with which a performer is associated, or a fashion label in which a designer has been heavily involved or for which they are well known. Remember that this parameter is an alternative to the others mentioned here and is not used along with them. * The {{para|works}} variant is intended to link to {{em|a specific list article}} for a larger body of work (not all of which may be individually notable). |- | {{mono|style}} | The style of the subject's works, if applicable. {{crossref|This parameter is not for [[Style (manner of address)|styles of address or office]]; see {{para|honorific_prefix}}.}} |- | {{mono|height}} | If person was notable for their height, or if height is relevant. If used, this should also include the year of the measurement if the person had not reached full adulthood when this stat was published. {{crossref|See documentation of this parameter at [[Template:Infobox sportsperson#height|Template:Infobox sportsperson]] for more information.}} |- | {{mono|television}} | Television programmes presented by or {{em|closely}} associated with the subject. For multiple entries, use an [[#Inline lists|inline list]]. |- | {{mono|title}} | Multiple uses: * Formal title, such as {{pval|First Lady of Japan}} for [[Akie Abe]]. * Awarded title, such as {{pval|Mr. Olympia}} for [[Arnold Schwarzenegger]]. * Job title, such as {{pval|President of Calvin College}} for [[Anthony Diekema]]. * A combination of the above, such as {{pval|Professor of Mathematics}} and {{pval|[[Fellow of the Royal Society]]}} for [[Bill Parry (mathematician)|Bill Parry]] For multiple entries, use an [[#Inline lists|inline list]]. Use the {{para|awards}} parameter, below, for awarded honors that are not really titles. A single award should not use both parameters. |- | {{mono|office}} | May be used as an alternative to {{para|title}} when the label is better displayed as '''Office''' (e.g. public office or appointments). Using this parameter will override {{para|title}}. |- | {{mono|term}} | Years the person held the {{para|title}} or {{para|office}} listed above. Helpful template: {{tlx|reign}} (also used for civil offices). |- | {{mono|predecessor}} | Person who previously held the {{para|title}} or {{para|office}} listed above. |- | {{mono|successor}} | Person who subsequently held the {{para|title}} or {{para|office}} listed above. |- | {{mono|party}} | If relevant. Field labelled '''Political party'''. |- | {{mono|otherparty}} | If relevant. Field labelled '''Other political affiliations'''. |- | {{mono|movement}} | If relevant. Can be [[Social movement|social]], [[Political movement|political]] (non-party), [[Art movement|artistic]], [[Philosophical movement|philosophical]], [[List of literary movements|literary]], [[Cultural movement|cultural]], etc. |- | {{mono|opponents}} | Notable relevant opponents (e.g., for major political office). |- | {{mono|boards}} | For [[board of directors]] membership(s), if relevant. Field labeled '''Board member&nbsp;of'''. |- | {{ubl|{{mono|criminal_charges}}|{{mono|criminal_penalty}}|{{mono|criminal_status}}}} | For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body. |- | {{mono|spouse}} | Name of spouse(s), followed by years of marriage. Use the format ''Name (married 1950–present)'' for a current spouse, and ''Name (married 1970–1999)'' for former spouse(s). Use article title (if linking) or [[Wikipedia:Article titles#Use commonly recognizable names|common name]]. For multiple entries, use an [[#Inline lists|inline list]]. For deceased persons still married at time of death, do not include the end year. |- | {{mono|partner}} | If particularly relevant, or if the partner is notable; "partner" here means unmarried life partners in a [[domestic partnership]] (of any gender or sexual orientation), not business partner. Use the format ''Name (1950–present)'' for current partner and ''Name (1970–1999)'' for former partner(s). |- | {{mono|children}} | Typically the number of children (e.g., {{pval|3}}); only list names of independently notable or particularly relevant children. Names may be preceded by a number to show total children and avoid implying that named children are the only offspring. For multiple entries, use an [[#Inline lists|inline list]]. {{em|For [[Wikipedia:Biographies of living persons#Privacy of names|privacy reasons]], consider omitting the names of living children, unless notable.}} |- | {{mono|parents}} | Names of parents; include only if they are independently notable or particularly relevant. For multiple entries, use an [[#Inline lists|inline list]]. If subject has only one notable mother and/or only one notable father, {{para|mother}} and {{para|father}} parameters may be used instead. These parameters may be used for biological, adoptive, foster, or step-parents. |- | {{mono|mother}} | Name of mother; include only if subject has one mother who is independently notable or particularly relevant. Displays '''Parent(s)''' as label, and is overridden by the {{para|parents}} parameter. |- | {{mono|father}} | Name of father; include only if subject has one father who is independently notable or particularly relevant. Displays '''Parent(s)''' as label, and is overridden by the {{para|parents}} parameter. |- | {{mono|relatives}} | Names of siblings or other relatives; include only if independently notable and particularly relevant. Include the relationship in parentheses after the name (sister, uncle, etc.). For multiple entries, use an [[#Inline lists|inline list]]. |- | {{mono|callsign}} | Amateur radio [[call sign]], if relevant. |- | {{mono|awards}} | Notable awards. If many, link to an appropriate section of the article instead. Use {{para|title}} parameter, above, for awarded titles; A single award should not use both parameters. |- | {{mono|website}} | Official website only. Unofficial websites should be placed under <code><nowiki>==External links==</nowiki></code> in the body of the article. Use {{tlx|URL}} as in {{tnull|URL|Example.com}}. Do not display the {{samp|www.}} part unless the site requires it. |- | {{mono|template_name}} | Used when {{tl|Infobox person}} is wrapped by another template. This would be the (lower-case) name of the wrapping template, without the "Template:" prefix. |- | {{ubl | {{mono|module}} | {{mono|module2}} | {{mono|module3}} | {{mono|module4}} | {{mono|module5}} | {{mono|module6}} }} | Used for embedding other infoboxes into this one. Example: <syntaxhighlight lang="wikitext"> {{Infobox person | name = Paul McCartney ... | module = {{Infobox musical artist | embed = yes | instrument = piano ... }} <!-- end of Infobox musical artist --> ... }} <!-- end of Infobox person --> </syntaxhighlight> {{crossref|For more detailed information, see [[Wikipedia:WikiProject Infoboxes/embed]].}} |- | {{mono|signature}} | An image of the person's signature. Please use image name: {{pval|abc.jpg}}, {{pval|xpz.png}}, {{pval|123.gif}}, etc., without the {{samp|File:}} or {{samp|Image:}} prefix |- | {{mono|signature_type}} | Changes the '''Signature''' label to the preferred argument, such as '''Seal''' |- | {{mono|signature_size}} | Default is {{samp|150px}}. If necessary, a signature can be resized manually as per the {{para|image_size}} parameter. |- | {{mono|signature_alt}} | Alt text for the signature image. For example, for {{samp|[[:File:Thomas Jefferson Signature.svg]]}}, the alt text might be {{para|signature_alt| Th: Jefferson}}, spelling out the signature exactly as it appears in the image. |- | {{mono|footnotes}} | Textual notes about any of the infobox data. This is not for reference citations. If an infobox parameter's value needs a citation, [[Wikipedia:Citing sources|cite inline]] at the end of the value. Citations will appear in the article's references section along with the other citations in the article. |- | {{mono|image_size}} | {{strongbad|Deprecated}}. Size to display image: {{pval|200px}} (set width), {{pval|x300px}} (set height), or {{pval|200x300px}} (max width & max height). If empty or omitted, this defaults to {{samp|frameless}} (default is {{samp|220px}}, but logged-in users can change this by clicking on "my preferences" and adjusting thumbnail size). [[Wikipedia:Image use policy#Displayed image size|Use of this parameter is discouraged]]. Use image_upright instead. Do not use "{{!mxt|×}}" or capital "{{!mxt|X}}" |} === Additional parameter usage explanation === ==== Image ==== The image in the infobox should be representative of the person who is the subject of the article. For some historical figures, particularly those born in the 18th century or before, this image is often a painting or other artistic depiction of the individual (see [[George Washington]]). Persons born in the 20th century onward, such as [[Barack Obama]], are most often represented by a photograph of the individual. When the subject of a biographical article has recently died, particularly those who have been publicly known for decades, editors may come to a consensus on the article's talk page regarding what image would best be suited for the infobox. An example of such a discussion can be found in the talk page archives for [[Elizabeth II]] (section [[Talk:Elizabeth II/Archive 45#Infobox photograph for after her death|Infobox photograph for after her death]]); in this instance, the 2015 photograph of Elizabeth II that was present in the article's infobox when discussions began was eventually replaced with a photograph of her taken in 1958. === Inline lists === {{Main|WP:Manual of Style/Lists#Horizontal lists|WP:Manual of Style/Lists#Unbulleted lists}} Parameters with multiple values should be formatted with inline-list templates. '''Horizontal''' ones include {{tlx|hlist}} or {{tlx|flatlist}}. In [[Wikipedia:Manual of Style/Lists#Horizontal lists|horizontal style]], only the first item is capitalized (aside from [[Wikipedia:Manual of Style/Capital letters#Proper names|proper names]]). This style is best for short items, and few of them. Mid-dots, commas or semicolons are available as separators (use semicolons or mid-dots if any items contain their own commas). For example: * {{para|parameter_name|{{tlp|hlist |Foo |bar |baz}}}} → {{hlist |Foo |bar |baz}} * {{para|parameter_name|{{tlp|cslist |Foo |bar |baz}}}} → {{cslist |Foo |bar |baz}} * {{para|parameter_name|{{tlp|cslist |Foo, fee |bar, bor |baz, biz |semi=true}}}} → {{cslist |Foo, fee |bar, bor |baz, biz |semi=true}} Horizontal list example with {{tlx|hlist|Item one|item two|item three}}: {{hlist|Item one|item two|item three}} '''Vertical''' templates are {{tlx|plainlist}} and {{tlx|unbulleted list}} (vertical), use [[Wikipedia:Manual of Style/Lists#Unbulleted lists|unbulleted, non-indented lists]] for clean display in infoboxes. Entries may be all [[sentence case]], or all lowercase (aside from proper names) after the first. This style is best for long items, and longer lists. For long lists of information that may not be of immediate interest but retained for reference, the {{tlx|collapsible list}} template can be used; this is not a universally accessible option, so should not be used for key information. ''[[Wikipedia:Manual of Style/Lists#Line breaks|Do not use {{tag|br|s}} markup]]'' to create fake lists, as in: {{!mxt|<nowiki>Item one<br />item two<br />item three</nowiki>}}. Vertical list example:, using {{tlx|unbulleted list|Item one|item two|item three}}: {{unbulleted list|Item one|item two|item three}} == Example == {{Infobox person{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}} | name = Bill Gates | post-nominals = | image = Bill Gates 2017 (cropped).jpg | alt = Head and shoulders photo of Bill Gates | caption = Gates in 2017 | birth_name = William Henry Gates III | birth_date = {{birth date and age|1955|10|28}} | birth_place = [[Seattle, Washington]], U.S. | known_for = Co-founder of [[Microsoft]] and [[Bill & Melinda Gates Foundation]] | education = [[Harvard University]] (dropped out) | occupation = {{hlist|Software developer|investor|entrepreneur}} | years_active = 1972–present | title = {{indented plainlist| * Co-[[chairperson]] of the Bill & Melinda Gates Foundation * Chairman and founder of [[Branded Entertainment Network]] * Chairman and founder of [[Cascade Investment]] * Chairman and co-founder of [[TerraPower]] * Founder of [[Breakthrough Energy]] * Technology advisor of Microsoft}} | boards = {{plainlist| *[[Berkshire Hathaway]] *Microsoft (former, both)}} | spouse = {{marriage|[[Melinda French]]|January 1, 1994|August 2, 2021|reason=divorce}} | children = 3 | father = [[Bill Gates Sr.]] | mother = [[Mary Maxwell Gates|Mary Maxwell]] | website = {{URL|https://www.gatesnotes.com}} | awards = {{ubl|[[Presidential Medal of Freedom]] (2016)|[[Hilal-e-Pakistan]] (2022)}} | signature = Bill Gates signature.svg | signature_alt = William H. Gates III }} <syntaxhighlight lang="wikitext" style="overflow: auto"> {{Infobox person | name = Bill Gates | post-nominals = | image = Bill Gates 2017 (cropped).jpg | alt = Head and shoulders photo of Bill Gates | caption = Gates in 2017 | birth_name = William Henry Gates III | birth_date = {{birth date and age|1955|10|28}} | birth_place = [[Seattle, Washington]], U.S. | known_for = Co-founder of [[Microsoft]] and [[Bill & Melinda Gates Foundation]] | education = [[Harvard University]] (dropped out) | occupation = {{hlist|Software developer|investor|entrepreneur}} | years_active = 1972–present | title = {{indented plainlist| * Co-[[chairperson]] of the Bill & Melinda Gates Foundation * Chairman and founder of [[Branded Entertainment Network]] * Chairman and founder of [[Cascade Investment]] * Chairman and co-founder of [[TerraPower]] * Founder of [[Breakthrough Energy]] * Technology advisor of Microsoft}} | boards = {{plainlist| *[[Berkshire Hathaway]] *Microsoft (former, both)}} | spouse = {{marriage|[[Melinda French]]|January 1, 1994|August 2, 2021|reason=divorce}} | children = 3 | father = [[Bill Gates Sr.]] | mother = [[Mary Maxwell Gates|Mary Maxwell]] | website = {{URL|https://www.gatesnotes.com}} | awards = {{ubl|[[Presidential Medal of Freedom]] (2016)|[[Hilal-e-Pakistan]] (2022)}} | signature = Bill Gates signature.svg | signature_alt = William H. Gates III }} </syntaxhighlight> == Microformat == {{UF-hcard-person}} {{clear}} == TemplateData == {{TemplateData header}} <div style="width:auto; overflow:scroll"> <templatedata> { "description": "An infobox for articles about people", "format": "{{_\n| __________________ = _\n}}\n", "params": { "honorific_prefix": { "description": "Honorific prefix(es), to appear on the line above the person's name", "label": "Honorific prefix", "aliases": [ "honorific-prefix", "honorific prefix", "pre-nominals" ] }, "name": { "description": "Common name of person (defaults to article name if left blank; provide birth_name (below) if different from name). If middle initials are specified (or implied) by the lead of the article, and are not specified separately in the birth_name field, include them here.", "label": "Name", "type": "string", "suggested": true }, "honorific_suffix": { "description": "Honorific suffix(es), to appear on the line below the person's name", "label": "Post-nominals", "aliases": [ "honorific-suffix", "honorific suffix", "post-nominals" ] }, "image": { "description": "Image name: abc.jpg, xpz.png, 123.gif, etc. If an image is desired but not available, one may add \"yes\" to the \"needs-photo\" section of the :Template:WPBiography on the talkpage. If no image is available yet, do not use an image placeholder.", "label": "Image", "example": "abc.jpg, xpz.png, 123.gif", "type": "wiki-file-name", "suggested": true }, "image_size": { "description": "DEPRECATED/DISCOURAGED. Size to display image: 200px (set width), x300px (set height), or 200x300px (max width & max height). This defaults to frameless (default is 220px, but logged in users can change this by clicking on \"my preferences\" and adjusting thumbnail size) if empty or omitted. Use of this parameter is discouraged as per WP:IMGSIZE. Use image_upright instead.", "label": "DEPRECATED: Image size", "aliases": [ "image size", "imagesize" ], "example": "200px", "default": "220px", "deprecated": "DEPRECATED: Use of this parameter is discouraged as per WP:IMGSIZE. Delete it when encountered and use image_upright instead." }, "alt": { "description": "Alt text for image, for visually impaired readers. One word (such as \"photograph\") is rarely sufficient. See WP:ALT.", "label": "Alt", "type": "string" }, "caption": { "description": "Caption for image, if needed. Try to include date of photo and the photographer.", "label": "Caption", "aliases": [ "image caption", "image_caption" ], "type": "string" }, "native_name": { "description": "The person's name in their own language, if different.", "label": "Native name", "type": "string" }, "native_name_lang": { "description": "ISO 639-1 code, e.g., \"fr\" for French. If more than one, use Template:lang in `native_name` instead.", "label": "Native name language" }, "pronunciation": { "description": "Details of how to pronounce the individual's native name.", "label": "Native name pronunciation" }, "birth_name": { "description": "Name at birth; only use if different from name.", "label": "Birth name", "aliases": [ "birthname" ], "type": "string" }, "birth_date": { "description": "Date of birth: {{Birth date and age|YYYY|MM|DD}} for living people. For people who have died, use {{Birth date|YYYY|MM|DD}}. If only a year of birth is known, or age as of a certain date, consider using Template:birth year and age or Template:birth based on age as of date.", "label": "Birth date", "type": "content" }, "birth_place": { "description": "Place of birth: city, administrative region, sovereign state. Use the name of the birthplace at the time of birth, e.g.: Saigon (prior to 1976), Ho Chi Minh City (post 1976). Do not use a flag template.", "label": "Birth place", "type": "string" }, "baptised": { "description": "Date of baptism: ONLY for use when birth date is not known (e.g., Beethoven). Will not display if a birth date is entered. Do not use subtemplates. Parameter 'baptized' can be used for articles that use American english spelling.", "label": "Baptised", "aliases": [ "baptized" ], "type": "date" }, "disappeared_date": { "description": "(For missing people) Date of disappearance: Template:disappeared date and age (if birth date is known) or Template:disappeared date (if birth date unknown).", "label": "Disappeared date" }, "disappeared_place": { "description": "(For missing people) Place of disappearance: city, administrative region, sovereign state. Do not use a flag template.", "label": "Disappeared place" }, "disappeared_status": { "description": "(For missing people) Current status for the person, e.g., if the person is still regarded as missing (using Template:missing for to calculate the time since disappearance), or if the person has been declared dead in absentia, with a date for such a ruling.", "label": "Disappeared status", "aliases": [ "status" ] }, "death_date": { "description": "Date of death: {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (if birth date is known) or Template:death date (if birth date unknown). See Template:Death date/doc for details on usage. If exact dates are unknown, consider using Template:death year and age.", "label": "Death date" }, "death_place": { "description": "Place of death: city, administrative region, sovereign state. Note: Do not use a flag template. Use the name of the deathplace at the time of death, e.g.: Saigon (prior to 1976), Ho Chi Minh City (post 1976)", "label": "Death place", "type": "string" }, "death_cause": { "description": "Cause of death. This should only be included when the cause of death has significance for the subject's notability.", "label": "Death cause", "aliases": [ "death cause" ] }, "body_discovered": { "description": "Place where the body was discovered (if different from place of death). Do not use a flag template.", "label": "Body discovered", "aliases": [ "body discovered" ] }, "resting_place": { "description": "Place of burial, ash-scattering, etc. Do not use a flag template.", "label": "Resting place", "aliases": [ "resting place", "restingplace" ] }, "resting_place_coordinates": { "description": "Coordinates for place of burial, ash-scattering etc. Use Template:coord template.", "label": "Resting place coordinates", "aliases": [ "resting place coordinates", "restingplacecoordinates" ] }, "monuments": { "description": "Significant monuments erected, buildings named, etc., in honour of the subject. If many, link to an appropriate section of the article instead.", "label": "Monuments" }, "nationality": { "description": "Nationality. May be used instead of citizenship (below) or vice versa in cases where any confusion could result. Should only be used 'with' citizenship when they somehow differ. Should only be used if nationality cannot be inferred from the birthplace per [[WP:INFONAT]]. Do not use a flag template.", "label": "Nationality", "type": "string" }, "other_names": { "description": "Other notable names for the person, if different from name and birth_name.", "label": "Other names", "aliases": [ "other names", "othername", "nickname", "alias" ] }, "siglum": { "description": "Siglum, monogram, shortcut, if relevant.", "label": "Siglum" }, "citizenship": { "description": "Country of legal citizenship, if different from nationality. Rarely needed. See usage notes for nationality above. Should only be used if citizenship cannot be inferred from the birthplace. Do not use a flag template.", "label": "Citizenship", "type": "string" }, "education": { "description": "Education, e.g., degree, institution and graduation year, if relevant. If very little information is available or relevant, the `alma_mater` parameter may be more appropriate.", "label": "Education" }, "alma_mater": { "description": "Alma mater. This parameter is a more concise alternative to `education`, and will most often simply consist of the linked name of the last-attended higher education institution. It is usually not relevant to include either parameter for non-graduates, but article talk page consensus may conclude otherwise, as at Bill Gates.", "label": "Alma mater", "aliases": [ "alma mater" ] }, "occupation": { "description": "Occupation(s) as given in the lead.", "label": "Occupation" }, "years_active": { "description": "Date range in years during which the subject was active in their principal occupation(s) and/or other activity for which they are notable. Use the format 1950–2000, or 1970–present if still active (note the use of an en dash, not hyphen). If no dates of birth and/or death are known for the subject, only a floruit date range, as is common with ancient subjects, this parameter can be used for it. If approximate (circa) dates are known for either or both, put them in the birth_date and death_date parameters.", "label": "Years active", "aliases": [ "years active", "yearsactive" ] }, "era": { "description": "Era during which the subject lived or was active. Less specific than 'years active'.", "label": "Era" }, "employer": { "description": "Employer(s), if relevant.", "label": "Employer" }, "organization": { "description": "Non-employing organization(s), if relevant.", "label": "Organization", "aliases": [ "organizations", "organisation", "organisations" ] }, "agent": { "description": "The subject's agent (individual and/or agency), discouraged in most cases, specifically when promotional, and requiring a reliable source.", "label": "Agent" }, "known_for": { "description": "A brief description of what the person is notable for.", "label": "Known For", "aliases": [ "known for", "known" ], "example": "Environmental activism" }, "notable_works": { "description": "Title(s) of notable work(s) (publications, compositions, sculptures, films, etc.) by the subject, if any.", "label": "Notable works", "aliases": [ "works", "credits", "notable works", "label_name" ] }, "style": { "description": "The style in which the subject works, if applicable.", "label": "Style" }, "net_worth": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "Current estimated net worth, if relevant. Please be sure to support with a citation from a reliable source, in the article body.", "label": "DEPRECATED: Net worth", "aliases": [ "net worth", "networth" ] }, "height": { "description": "If person was notable for their height, or if height is relevant. If used, this should also include the year of the measurement if the person had not reached full adulthood when this stat was published. See documentation of this parameter at Template:Infobox sportsperson for more information.", "label": "Height" }, "height_m": { "description": "If person was notable for their height, or if height is relevant, their height in metres (it will be automatically converted to Imperial).", "label": "Height in metres", "type": "number" }, "height_cm": { "description": "If person was notable for their height, or if height is relevant, their height in centimetres (it will be automatically converted to Imperial).", "label": "Height in centimetres", "type": "number" }, "height_ft": { "description": "If person was notable for their height, or if height is relevant, their height in whole feet (it will be automatically converted to SI). Use with height_in.", "label": "Height in feet", "type": "number" }, "height_in": { "description": "If person was notable for their height, or if height is relevant, their height in remaining inches (it will be automatically converted to SI). Use with height_ft.", "label": "Remaining height in inches", "type": "number" }, "weight": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "label": "DEPRECATED: Weight" }, "weight_kg": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in kilogrammes (it will be automatically converted to Imperial).", "label": "DEPRECATED: Weight in kilogrammes" }, "weight_lb": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in pounds, or their weight in remaining pounds if weight in whole stones is specified (it will be automatically converted to SI).", "label": "DEPRECATED: Weight in pounds" }, "weight_st": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in whole stones (it will be automatically converted to SI).", "label": "DEPRECATED: Weight in stones" }, "television": { "description": "Television programmes presented by or closely associated with the subject.", "label": "Television" }, "title": { "description": "Multiple uses: Formal title, such as First Lady of Japan for Akie Abe.; Awarded title, such as Mr. Olympia for Arnold Schwarzenegger.; Job title, such as President of Calvin College for Anthony Diekema.; A combination of the above, such as Professor of Mathematics and Fellow of the Royal Society for Bill Parry See also \"awards\" parameter, below, for awarded honors that are not really titles. A single award should not use both parameters.", "label": "Title", "aliases": [ "office" ] }, "term": { "description": "Years the person held the title listed above.", "label": "Term" }, "predecessor": { "description": "Person who previously held the title listed above.", "label": "Predecessor" }, "successor": { "description": "Person who subsequently held the title listed above.", "label": "Successor" }, "party": { "description": "If relevant. Field labelled Political party.", "label": "Party" }, "otherparty": { "description": "If relevant. Field labelled Other political affiliations.", "label": "Other party" }, "movement": { "description": "If relevant. '''Movement''' can be social, political (non-party), artistic, philosophical, literary, cultural, etc.", "label": "Movement" }, "opponents": { "description": "Notable relevant opponents (e.g., for major political office).", "label": "Opponents" }, "boards": { "description": "For board of directors membership(s), if relevant. Field labeled Board member of.", "label": "Boards" }, "criminal_charges": { "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources in the article body.", "label": "Criminal charge(s)", "aliases": [ "criminal_charge", "criminal charge" ] }, "criminal_penalty": { "label": "Criminal penalty", "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body.", "aliases": [ "criminal penalty" ] }, "criminal_status": { "label": "Criminal status", "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body.", "aliases": [ "judicial_status", "judicial status", "criminal status" ] }, "spouse": { "description": "Name of spouse(s), followed by years of marriage. Use the format Name (married 1950–present) for a current spouse, and Name (married 1970–1999) for former spouse(s). Separate entries using Template:Plainlist or Template:Unbulleted list. For deceased persons still married at time of death, do not include an end year. {{Marriage}} may be used.", "label": "Spouse(s)", "aliases": [ "spouses", "spouse(s)" ] }, "partner": { "description": "For unmarried life partners in a domestic partnership (of any gender or sexual orientation), not business partners. Use the format Name (1950–present) for current partner and Name (1970–1999) for former partner(s).", "label": "Partner(s)", "aliases": [ "partners", "partner(s)", "domestic_partner", "domesticpartner" ] }, "children": { "description": "Number of children (e.g., 3), or list of independently notable names, in which case, separate entries using Template:Plainlist or Template:Unbulleted list. Names may be preceded by a number to show total children and avoid implying that named children are the only offspring. For privacy reasons, consider omitting the names of children of living persons, unless notable.", "label": "Children" }, "parents": { "description": "Names of parents. Separate entries using Template:Plainlist or Template:Unbulleted list. If subject has only one notable mother and/or father, 'mother' and 'father' parameters may be used instead", "label": "Parent(s)" }, "mother": { "description": "Name of mother; include only if subject has one mother who is independently notable or particularly relevant. Overwritten by 'parents' parameter.", "label": "Mother", "type": "string" }, "father": { "description": "Name of father; include only if subject has one father who is independently notable or particularly relevant. Overwritten by 'parents' parameter.", "label": "Father", "type": "string" }, "relatives": { "description": "Names of siblings or other relatives. Include the relationship in parentheses after the name (sister, uncle, etc). Separate entries using Template:Plainlist or Template:Unbulleted list.", "label": "Relatives", "aliases": [ "relations" ] }, "family": { "description": "Family or house of the individual, if notable.", "label": "Family" }, "callsign": { "description": "Amateur radio call sign, if relevant.", "label": "Callsign" }, "awards": { "description": "Notable awards. If many, link to an appropriate section of the article instead. See also \"title\" parameter, above, for awarded titles. A single award should not use both parameters.", "label": "Awards" }, "honours": { "description": "Honours the individual has been awarded, if notable.", "label": "Honours", "aliases": [ "honors" ] }, "website": { "description": "Official website only. Unofficial websites should be placed under ==External links== in the body of the article. Use {{URL}}. Do not include the www. part unless the server requires it. Use camel case capitalization to make multiword domain names easier to read.", "label": "Website", "aliases": [ "homepage", "URL", "url" ], "type": "content", "example": "{{URL|example.com}}", "suggested": true }, "module": { "description": "Used for embedding other infoboxes into this one.", "label": "Module", "aliases": [ "misc" ] }, "module2": { "description": "Used for embedding other infoboxes into this one.", "label": "Module two", "aliases": [ "misc2" ] }, "module3": { "description": "Used for embedding other infoboxes into this one.", "label": "Module three", "aliases": [ "misc3" ] }, "module4": { "description": "Used for embedding other infoboxes into this one.", "label": "Module four", "aliases": [ "misc4" ] }, "module5": { "description": "Used for embedding other infoboxes into this one.", "label": "Module five", "aliases": [ "misc5" ] }, "module6": { "description": "Used for embedding other infoboxes into this one.", "label": "Module six", "aliases": [ "misc6" ] }, "child": { "label": "DEPRECATED: Use as an embedded infobox", "description": "DEPRECATED: Use this infobox within another one. For experts only.", "example": "yes", "deprecated": true, "aliases": [ "embed" ] }, "signature": { "description": "An image of the person's signature. Please use image name: abc.jpg, xpz.png, 123.gif, etc.", "label": "Signature", "type": "wiki-file-name" }, "signature_type": { "description": "Alter from Signature to, for example, Seal", "label": "Signature type", "type": "string" }, "signature_size": { "description": "Default is 150px. If necessary, a signature can be resized manually as per the \"image_size\" parameter.", "label": "Signature size" }, "signature_alt": { "description": "Alt text for the signature image. For example, for :File:Thomas Jefferson Signature.svg, the alt text might be |signature_alt= Th: Jefferson, spelling out the signature exactly as it appears in the image.", "label": "Signature alt", "aliases": [ "signature alt" ], "type": "string" }, "footnotes": { "description": "Notes about any of the infobox data.", "label": "Footnotes" }, "abovestyle": { "description": "DEPRECATED: A CSS style to use for the individual's name, over-riding the community norm. Only use in exception circumstances.", "label": "DEPRECATED: Name CSS over-ride", "deprecated": true }, "image_upright": { "label": "Image upright", "description": "Scales the image thumbnail from its default size by the given factor. Values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%).", "example": "1.15", "default": "1", "type": "number" }, "landscape": { "label": "Landscape", "description": "Set to yes when using wide, short images. The image height (rather than width) will be limited to 200 pixels.", "type": "boolean" }, "burial_place": { "label": "Burial place", "description": "Place of burial, alternative to 'Resting place' Displays the label 'Burial place'.", "type": "content" }, "burial_coordinates": { "label": "Burial place coordinates", "description": "Coordinates for place of burial, to accompany 'Burial place'. Use {{coord}} template." }, "influences": { "label": "DEPRECATED: Influences", "description": "DEPRECATED and unused in the infobox. Do not use.", "deprecated": "Deprecated. Unused in the infobox. Do not use." }, "influenced": { "label": "DEPRECATED: Influenced", "description": "DEPRECATED and unused in the infobox. Do not use.", "deprecated": "Deprecated. Unused in the infobox. Do not use." }, "home_town": { "aliases": [ "home town" ], "label": "DEPRECATED: home_town", "description": "The place where the person was raised and matured, if different from birth place.", "deprecated": "DEPRECATED and now unused in the infobox. Do not use." }, "nocat_wdimage": { "label": "nocat_wdimage", "description": "Where an infobox has no image but Wikidata has an image name, add an image or |nocat_wdimage=yes to the infobox.", "type": "string" } }, "paramOrder": [ "honorific_prefix", "name", "honorific_suffix", "image", "image_upright", "landscape", "image_size", "alt", "caption", "native_name", "native_name_lang", "pronunciation", "other_names", "siglum", "birth_name", "birth_date", "birth_place", "baptised", "disappeared_date", "disappeared_place", "disappeared_status", "death_date", "death_place", "death_cause", "body_discovered", "resting_place", "resting_place_coordinates", "burial_place", "burial_coordinates", "monuments", "nationality", "citizenship", "education", "alma_mater", "occupation", "years_active", "era", "employer", "organization", "agent", "known_for", "notable_works", "style", "net_worth", "height", "height_m", "height_cm", "height_ft", "height_in", "weight", "weight_kg", "weight_lb", "weight_st", "television", "title", "term", "predecessor", "successor", "party", "otherparty", "movement", "opponents", "boards", "criminal_charges", "criminal_penalty", "criminal_status", "spouse", "partner", "children", "parents", "mother", "father", "relatives", "family", "callsign", "awards", "honours", "website", "module", "module2", "module3", "module4", "module5", "module6", "signature", "signature_type", "signature_size", "signature_alt", "footnotes", "nocat_wdimage", "abovestyle", "child", "influences", "influenced", "home_town" ] } </templatedata> </div> == Tracking categories == * {{clc|Pages using infobox person with unknown parameters}} * {{clc|Pages using infobox person with conflicting parameters}} * {{clc|Pages using infobox person with multiple employers}} * {{clc|Pages using infobox person with multiple organizations}} * {{clc|Pages using infobox person with multiple agents}} * {{clc|Pages using infobox person with multiple credits}} * {{clc|Pages using infobox person with multiple labels}} * {{clc|Pages using infobox person with multiple opponents}} * {{clc|Pages using infobox person with multiple criminal charges}} * {{clc|Pages using infobox person with multiple spouses}} * {{clc|Pages using infobox person with multiple partners}} * {{clc|Pages using infobox person with multiple parents}} * {{clc|Biography template using pronunciation}} * {{clc|Biography with signature}} * {{clc|No local image but image on Wikidata}} – Used by [[Template:Wikidata image]] to track articles where an infobox has no image but [[Wikidata]] has an image name. To exclude articles from this category, add an image or {{para|nocat_wdimage|yes}} to the infobox. == See also == Variations of this template which use [[Wikidata]]: * {{tl|Infobox person/Wikidata}} Dependencies: * {{tl|Br separated entries}} * {{tl|Pluralize from text}} * {{tl|Main other}} * {{tl|Convinfobox}} * {{tl|Infobox person/height}} * {{tl|Count}} * {{tl|Unbulleted list}} * {{tl|If empty}} Alternative templates are listed at [[Wikipedia:WikiProject Biography/Infoboxes|WikiProject Biography/Infoboxes]] and within the [[:Category:People and person infobox templates|people and person infobox templates category]]. <div style="display: none">{{reflist}}</div> {{Film- and television-related infobox templates}} <includeonly> {{Basepage subpage| [[Category:People and person infobox templates| ]] [[Category:Biographical templates usable as a module|Person]] [[Category:Infobox templates with module parameter|Person]] [[Category:Templates that add a tracking category]] }} </includeonly> eb6a7aeb27709b030b473600fc9aa9a59c4d295d Main Page/languages 0 6 8 2024-03-15T12:00:06Z Motzoid India 2 Created page with "{{hlist|[[:bn:|বাংলা]] (Bengali)|[[:bho:|भोजपुरी]] (Bhojpuri)|[[:hi:|हिन्दी]] (Hindi)|[[:mr:|मराठी]] (Marathi)|[[:mni:|ꯃꯩꯇꯩ]] (Meitei)|[[:sa:|संस्कृतम्]] (Sanskrit)|[[:ta:|தமிழ்]] (Tamil)|[[:pa:|ਪੰਜਾਬੀ]] (Punjabi)|[[:hig:|Hinglish]]|style=text-align:center;}}" wikitext text/x-wiki {{hlist|[[:bn:|বাংলা]] (Bengali)|[[:bho:|भोजपुरी]] (Bhojpuri)|[[:hi:|हिन्दी]] (Hindi)|[[:mr:|मराठी]] (Marathi)|[[:mni:|ꯃꯩꯇꯩ]] (Meitei)|[[:sa:|संस्कृतम्]] (Sanskrit)|[[:ta:|தமிழ்]] (Tamil)|[[:pa:|ਪੰਜਾਬੀ]] (Punjabi)|[[:hig:|Hinglish]]|style=text-align:center;}} 424b69dc5b571df94cbe87e93c339c9a0f5ccb9a Main Page/topics 0 7 11 2024-03-15T12:37:07Z Motzoid India 2 Created page with " <div style="text-align:center;font-size:120%;">'''[[History of India|History]]''' ----</div> <small>[[Timeline of Indian history]], [[Indus Valley Civilisation]], [[Dholavira]], [[Science and technology in ancient India]], [[Meluhha]], [[Aryan invasion theory]], [[Out of India theory]], [[Greek conquests in India]], [[Indian maritime history]], [[Maurya Empire]], [[Ashoka]], [[Shunga Empire]], [[Hoysala Empire]], [[Vijayanagara]], [[Satavahana dynasty]], Indo-Greek Ki..." wikitext text/x-wiki <div style="text-align:center;font-size:120%;">'''[[History of India|History]]''' ----</div> <small>[[Timeline of Indian history]], [[Indus Valley Civilisation]], [[Dholavira]], [[Science and technology in ancient India]], [[Meluhha]], [[Aryan invasion theory]], [[Out of India theory]], [[Greek conquests in India]], [[Indian maritime history]], [[Maurya Empire]], [[Ashoka]], [[Shunga Empire]], [[Hoysala Empire]], [[Vijayanagara]], [[Satavahana dynasty]], [[Indo-Greek Kingdom]], [[Indo-Scythians]], [[Indo-Parthian Kingdom]], [[Kushan Empire]], [[Western Satraps]], [[Gupta Empire]], [[Chola dynasty]], [[Pala Empire]], [[Islamic Empires in India|Islamic incursions in India]], [[Mughal Empire]], [[Maratha Empire]], [[British Raj]], [[East India Company]], [[Governor-General of India|Governor-General]], [[Viceroy of India|Viceroy]], [[Indian Rebellion of 1857|War of Independence, 1857]], [[Indian independence movement]], [[Indian National Army]], [[Azad Hind]], [[Quit India Movement]], [[Partition of India]], [[History of Republic of India]], [[Non-Aligned Movement]], [[Sino-Indian War]], [[Indo-Pakistani War of 1947–1948]], [[Indo-Pakistani War of 1965]], [[Indo-Pakistani War of 1971]], [[Kargil War]], [[2001–02 India–Pakistan standoff]], [[Military history of India|Military]], [[Demographics of India|Demographic]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Politics of India|Politics]]''' ----</div> <small>[[Law of India|Law]], [[Hindu law]], [[Constitution of India|Constitution]], [[List of political parties in India|Political parties]] ([[Indian National Congress]], [[Bharatiya Janata Party]]), [[Foreign relations of India|Foreign relations]], [[Elections in India|Elections]], [[States and union territories of India|Political divisions]], [[Reservation in India]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Government of India|Government]]''' ----</div> <small>[[List of agencies of the government of India|Government agencies]], [[Legislative branch]] ([[Lok Sabha]], [[Rajya Sabha]]) [[Executive branch]] ([[President of India|President]] & [[Vice President of India|Vice President]], [[Prime Minister of India|Prime Minister]] & [[Deputy Prime Minister of India|Deputy Prime Minister]], [[Indian Cabinet Ministers|Cabinet Ministers]], [[Cabinet Secretary (India)|Cabinet Secretary]], [[Election Commission of India|Election Commission]], [[Indian Foreign Minister|Foreign Minister]]; [[Law enforcement in India|Law enforcement]]: [[Central Bureau of Investigation|CBI]], [[Criminal Investigations Department#India|CID]], [[List of Indian intelligence agencies|Intelligence]]: [[Intelligence Bureau (India)|IB]], [[Research and Analysis Wing|RAW]]), [[Directorate General of Income Tax Investigation]] [[Judicial branch]] ([[Supreme Court of India|Supreme Court]]), [[Indian Armed Forces|Armed Forces]] ([[Indian Army|Army]], [[Indian Navy|Navy]], [[Indian Air Force|Air Force]], [[Border Security Force]], [[Indian Coast Guard| Coast Guard]])</small> ---- <div style="text-align:center;font-size:120%;">'''[[Geography of India|Geography]]''' ----</div> <small>[[Himalayas]], [[Western Ghats]], [[Eastern Ghats]], [[Indo-Gangetic Plain]], [[Deccan Plateau]], [[Thar Desert]], [[Ganges]], [[Rann of Kutch]], [[Brahmaputra River]], [[Northeast India]]; [[List of mountains in India|Mountains]], [[List of valleys in India|Valleys]], [[List of islands of India|Islands]], [[List of rivers of India|Rivers]]; [[States and union territories of India|States and union territories]], [[List of cities in India|Cities]], [[Districts of India|Districts]], [[list of regions in India|Regions]], [[Fauna of India|Fauna]], [[Flora of India|Flora]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Economy of India|Economy]]''' ----</div> <small> [[Indian rupee|Rupee]], [[Bombay Stock Exchange]], [[National Stock Exchange of India|National Stock Exchange]], [[Standard of living in India|Standard of living]], [[List of companies of India|Companies]], [[Reserve Bank of India]], [[Energy policy of India|Energy policy]] ([[Solar power in India|Solar]], [[Wind power in India|Wind]], [[Nuclear power in India|Nuclear]]), [[Tourism in India|Tourism]], [[Transport in India|Transport]] ([[Expressways of India|Expressways]], [[Rail transport in India|Rail transport]], [[Auto rickshaw]]), </small> ---- <div style="text-align:center;font-size:120%;">'''[[Demographics of India|Demographics]]''' ----</div> <small>[[Languages of India|Languages]], [[Standard of living in India|Standard of living]], [[Religion in India|Religion]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Arts and entertainment in India|Arts]] & [[Culture of India|Culture]]''' ----</div> <small>[[Music of India|Music]] ([[Carnatic music|Carnatic]], [[Hindustani classical music|Hindustani]], [[Indi-pop]]), [[Indian classical dance|Dance]], [[Languages of India|Languages]], [[Indian literature|Literature]], [[Architecture of India|Architecture]], [[Cinema of India|Film]] & [[Television in India|TV]], [[Indian cuisine|Cuisine]], [[Public holidays in India|Holidays]], [[Folklore of India|Folklore]], [[Education in India|Education]], [[Media of India|Media]], [[Indian martial arts]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Science and technology in India|Science & Tech]]''' ----</div> <small> [[Indian Council of Agricultural Research]] (ICAR), [[Indian Institute of Astrophysics]], [[National Centre for Software Technology]], [[All India Institutes of Medical Sciences|AIIMS]], [[Indian Institute of Science|IISc]], [[Indian Institutes of Technology|IIT]], [[National Institutes of Technology|NIT]], [[Birla Institute of Technology and Science, Pilani |BITS-Pilani]], [[INRegistry]], [[Indian numbering system]], [[Indian Space Research Organisation]], [[National Internet Exchange of India]], [[International Crops Research Institute for the Semi-Arid Tropics|ICRISAT]], [[International Institute of Information Technology, Hyderabad]] </small> ---- <div style="text-align:center;font-size:120%;">'''Other''' ----</div> <small> [[Indian English]], [[Indian nationality law]], [[Indian numbering system|Numbering system]], [[Indian Space Research Organisation]], [[Telecommunications in India|Telecommunications]], [[National Highways Development Project]], [[Flag of India|Flag]], [[Vehicle registration plates of India|Vehicle registration plates]], [[Indian nationalism]], [[Metrication in India]]</small> 8fc754dedece564ec1978eb5a9dd6fd256fe2891 Module:Arguments 828 9 13 2024-03-15T12:40:49Z Motzoid India 2 Created page with "-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string'..." Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Arguments/doc 828 10 14 2024-03-15T12:41:37Z Motzoid India 2 Created page with "-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string'..." wikitext text/x-wiki -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Documentation/config 828 11 15 2024-03-15T12:42:21Z Motzoid India 2 Created page with "---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------..." Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Bharatpedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Bharatpedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Bharatpedia:Template documentation|documentation]] is [[Bharatpedia:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Bharatpedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['file-docpage-preload'] -- Preload file for documentation page in the file namespace. cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- Print version configuration ---------------------------------------------------------------------------------------------------- -- cfg['print-subpage'] -- The name of the template subpage used for print versions. cfg['print-subpage'] = 'Print' -- cfg['print-link-display'] -- The text to display when linking to the /Print subpage. cfg['print-link-display'] = '/Print' -- cfg['print-blurb'] -- Text to display if a /Print subpage exists. $1 is a link to the subpage with -- a display value of cfg['print-link-display']. cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.' .. ' If you make a change to this template, please update the print version as well.' -- cfg['display-print-category'] -- Set to true to enable output of cfg['print-category'] if a /Print subpage exists. -- This should be a boolean value (either true or false). cfg['display-print-category'] = true -- cfg['print-category'] -- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists. cfg['print-category'] = 'Templates with print versions' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Bharatpedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Bharatpedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 88104584c928942cb3c3a4b4d4e9b64c382097df Template:Documentation 10 12 16 2024-03-15T12:43:02Z Motzoid India 2 Created page with "{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> ce7fd93f18c46b4fa871bf679afd05cbda72d8c4 Module:List 828 13 17 2024-03-15T12:43:39Z Motzoid India 2 Created page with "local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = ''..." Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:TableTools 828 14 18 2024-03-15T12:44:25Z Motzoid India 2 Created page with "--[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke...." Scribunto text/plain --[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke. -- ------------------------------------------------------------------------------------ --]] local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti --[[ ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ --]] function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end --[[ ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a value can be a valid table key. Lua will -- generate an error if a NaN is used as a table key. ------------------------------------------------------------------------------------ --]] function p.isNan(v) return type(v) == 'number' and tostring(v) == '-nan' end --[[ ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ --]] function p.shallowClone(t) local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end --[[ ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ --]] function p.removeDuplicates(t) checkType('removeDuplicates', 1, t, 'table') local isNan = p.isNan local ret, exists = {}, {} for i, v in ipairs(t) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end --[[ ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ --]] function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k, v in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will -- return {1, 3, 6}. ------------------------------------------------------------------------------------ --]] function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k, v in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table -- of subtables in the format -- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} } -- Keys that don't end with an integer are stored in a subtable named "other". -- The compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end --[[ ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end --[[ ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ --]] function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end --[[ ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ --]] function p.size(t) checkType('size', 1, t, 'table') local i = 0 for k in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 else -- This will fail with table, boolean, function. return item1 < item2 end end --[[ Returns a list of the keys in a table, sorted using either a default comparison function or a custom keySort function. ]] function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' }) end local list = {} local index = 1 for key, value in pairs(t) do list[index] = key index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(list, keySort) end return list end --[[ Iterates through a table, with the keys sorted using the keysToList function. If there are only numerical keys, sparseIpairs is probably more efficient. ]] function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local list = p.keysToList(t, keySort, true) local i = 0 return function() i = i + 1 local key = list[i] if key ~= nil then return key, t[key] else return nil, nil end end end --[[ Returns true if all keys in the table are consecutive integers starting at 1. --]] function p.isArray(t) checkType("isArray", 1, t, "table") local i = 0 for k, v in pairs(t) do i = i + 1 if t[i] == nil then return false end end return true end -- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 } function p.invert(array) checkType("invert", 1, array, "table") local map = {} for i, v in ipairs(array) do map[v] = i end return map end --[[ { "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true } --]] function p.listToSet(t) checkType("listToSet", 1, t, "table") local set = {} for _, item in ipairs(t) do set[item] = true end return set end --[[ Recursive deep copy function. Preserves identities of subtables. ]] local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = deepcopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end --[[ Concatenates all values in the table that are indexed by a number, in order. sparseConcat{ a, nil, c, d } => "acd" sparseConcat{ nil, b, c, d } => "bcd" ]] function p.sparseConcat(t, sep, i, j) local list = {} local list_i = 0 for _, v in p.sparseIpairs(t) do list_i = list_i + 1 list[list_i] = v end return table.concat(list, sep, i, j) end --[[ -- Finds the length of an array, or of a quasi-array with keys such -- as "data1", "data2", etc., using an exponential search algorithm. -- It is similar to the operator #, but may return -- a different value when there are gaps in the array portion of the table. -- Intended to be used on data loaded with mw.loadData. For other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of -- the number of unnamed template parameters, so use this function for -- frame.args. --]] function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] -- which is only needed by this one function -- doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function(i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p ad3062fee63cdfb979a1543abf96236cf7bf609d Template:Hlist 10 15 19 2024-03-15T12:44:51Z Motzoid India 2 Created page with "{{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 23 19 2024-03-15T12:49:10Z Motzoid India 2 wikitext text/x-wiki {{Template:Hlist/styles.css}} {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 83139ca93e3bf55c6968bf543f5681f2ef87f3af Template:Rcat shell 10 16 20 2024-03-15T12:47:54Z Motzoid India 2 Redirected page to [[Template:Redirect category shell]] wikitext text/x-wiki #REDIRECT [[Template:Redirect category shell]] {{Redirect category shell| {{R from high-use template}} {{R to redirect template}} {{R from template shortcut}} }} d69130a4c8803832875c8bd02c0770dcaa8aa644 Template:Pp-protected 10 17 21 2024-03-15T12:47:58Z Motzoid India 2 Redirected page to [[Template:Pp]] wikitext text/x-wiki #REDIRECT [[Template:Pp]] {{Rcat shell| {{R from move}} {{R from long name}} {{R with history}} {{R for convenience}} }} [[Category:Top icon protection templates]] 82f7281255cac8778078063ac266fa710e0cf32a Template:Hlist/styles.css 10 18 22 2024-03-15T12:48:04Z Motzoid India 2 Created page with "/* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or s..." wikitext text/x-wiki /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Main Page/Introduction 10 20 25 2024-03-15T12:53:37Z Motzoid India 2 Created page with "<noinclude> <center> {| style="border:1px black solid;" |<center>This page is a part of the [[Main page|Main Page]] and should stay protected at all times |} </center> </noinclude> <div style=" width: 93%; text-align: center; "> ''This'' is a place where people work together to write [[encyclopedia]]s in Indian English. All of the pages on this Wiki are free to use. They have all been published under both the ''Creative Commons Attribution/Share-Alike License 3.0'' a..." wikitext text/x-wiki <noinclude> <center> {| style="border:1px black solid;" |<center>This page is a part of the [[Main page|Main Page]] and should stay protected at all times |} </center> </noinclude> <div style=" width: 93%; text-align: center; "> ''This'' is a place where people work together to write [[encyclopedia]]s in Indian English. All of the pages on this Wiki are free to use. They have all been published under both the ''Creative Commons Attribution/Share-Alike License 3.0'' and the ''GNU Free Documentation License''. '''You can help here!''' You may change these pages and make new pages. Read the [[Help:Contents|help pages]] and other [[Aryavartpedia:Useful|good pages]] to learn how to [[Aryavartpedia:How to write Indian English articles|write pages here]]. If you need help, you may ask questions at [[Bharatpedia:Help|this talk page]]. Also, It should be noted that Aryavartpedia has no affiliation with Wikipedia. Although both use the term "pedia" in their name, they have always been completely separate and unaffiliated projects. </div> [[Category:Main Page]] b6d063d41c379e30914e9347b245882682dc393f Template:Main Page/topics 10 21 26 2024-03-15T12:55:10Z Motzoid India 2 Created page with " <div style="text-align:center;font-size:120%;">'''[[History of India|History]]''' ----</div> <small>[[Timeline of Indian history]], [[Indus Valley Civilisation]], [[Dholavira]], [[Science and technology in ancient India]], [[Meluhha]], [[Aryan invasion theory]], [[Out of India theory]], [[Greek conquests in India]], [[Indian maritime history]], [[Maurya Empire]], [[Ashoka]], [[Shunga Empire]], [[Hoysala Empire]], [[Vijayanagara]], [[Satavahana dynasty]], Indo-Greek Ki..." wikitext text/x-wiki <div style="text-align:center;font-size:120%;">'''[[History of India|History]]''' ----</div> <small>[[Timeline of Indian history]], [[Indus Valley Civilisation]], [[Dholavira]], [[Science and technology in ancient India]], [[Meluhha]], [[Aryan invasion theory]], [[Out of India theory]], [[Greek conquests in India]], [[Indian maritime history]], [[Maurya Empire]], [[Ashoka]], [[Shunga Empire]], [[Hoysala Empire]], [[Vijayanagara]], [[Satavahana dynasty]], [[Indo-Greek Kingdom]], [[Indo-Scythians]], [[Indo-Parthian Kingdom]], [[Kushan Empire]], [[Western Satraps]], [[Gupta Empire]], [[Chola dynasty]], [[Pala Empire]], [[Islamic Empires in India|Islamic incursions in India]], [[Mughal Empire]], [[Maratha Empire]], [[British Raj]], [[East India Company]], [[Governor-General of India|Governor-General]], [[Viceroy of India|Viceroy]], [[Indian Rebellion of 1857|War of Independence, 1857]], [[Indian independence movement]], [[Indian National Army]], [[Azad Hind]], [[Quit India Movement]], [[Partition of India]], [[History of Republic of India]], [[Non-Aligned Movement]], [[Sino-Indian War]], [[Indo-Pakistani War of 1947–1948]], [[Indo-Pakistani War of 1965]], [[Indo-Pakistani War of 1971]], [[Kargil War]], [[2001–02 India–Pakistan standoff]], [[Military history of India|Military]], [[Demographics of India|Demographic]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Politics of India|Politics]]''' ----</div> <small>[[Law of India|Law]], [[Hindu law]], [[Constitution of India|Constitution]], [[List of political parties in India|Political parties]] ([[Indian National Congress]], [[Bharatiya Janata Party]]), [[Foreign relations of India|Foreign relations]], [[Elections in India|Elections]], [[States and union territories of India|Political divisions]], [[Reservation in India]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Government of India|Government]]''' ----</div> <small>[[List of agencies of the government of India|Government agencies]], [[Legislative branch]] ([[Lok Sabha]], [[Rajya Sabha]]) [[Executive branch]] ([[President of India|President]] & [[Vice President of India|Vice President]], [[Prime Minister of India|Prime Minister]] & [[Deputy Prime Minister of India|Deputy Prime Minister]], [[Indian Cabinet Ministers|Cabinet Ministers]], [[Cabinet Secretary (India)|Cabinet Secretary]], [[Election Commission of India|Election Commission]], [[Indian Foreign Minister|Foreign Minister]]; [[Law enforcement in India|Law enforcement]]: [[Central Bureau of Investigation|CBI]], [[Criminal Investigations Department#India|CID]], [[List of Indian intelligence agencies|Intelligence]]: [[Intelligence Bureau (India)|IB]], [[Research and Analysis Wing|RAW]]), [[Directorate General of Income Tax Investigation]] [[Judicial branch]] ([[Supreme Court of India|Supreme Court]]), [[Indian Armed Forces|Armed Forces]] ([[Indian Army|Army]], [[Indian Navy|Navy]], [[Indian Air Force|Air Force]], [[Border Security Force]], [[Indian Coast Guard| Coast Guard]])</small> ---- <div style="text-align:center;font-size:120%;">'''[[Geography of India|Geography]]''' ----</div> <small>[[Himalayas]], [[Western Ghats]], [[Eastern Ghats]], [[Indo-Gangetic Plain]], [[Deccan Plateau]], [[Thar Desert]], [[Ganges]], [[Rann of Kutch]], [[Brahmaputra River]], [[Northeast India]]; [[List of mountains in India|Mountains]], [[List of valleys in India|Valleys]], [[List of islands of India|Islands]], [[List of rivers of India|Rivers]]; [[States and union territories of India|States and union territories]], [[List of cities in India|Cities]], [[Districts of India|Districts]], [[list of regions in India|Regions]], [[Fauna of India|Fauna]], [[Flora of India|Flora]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Economy of India|Economy]]''' ----</div> <small> [[Indian rupee|Rupee]], [[Bombay Stock Exchange]], [[National Stock Exchange of India|National Stock Exchange]], [[Standard of living in India|Standard of living]], [[List of companies of India|Companies]], [[Reserve Bank of India]], [[Energy policy of India|Energy policy]] ([[Solar power in India|Solar]], [[Wind power in India|Wind]], [[Nuclear power in India|Nuclear]]), [[Tourism in India|Tourism]], [[Transport in India|Transport]] ([[Expressways of India|Expressways]], [[Rail transport in India|Rail transport]], [[Auto rickshaw]]), </small> ---- <div style="text-align:center;font-size:120%;">'''[[Demographics of India|Demographics]]''' ----</div> <small>[[Languages of India|Languages]], [[Standard of living in India|Standard of living]], [[Religion in India|Religion]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Arts and entertainment in India|Arts]] & [[Culture of India|Culture]]''' ----</div> <small>[[Music of India|Music]] ([[Carnatic music|Carnatic]], [[Hindustani classical music|Hindustani]], [[Indi-pop]]), [[Indian classical dance|Dance]], [[Languages of India|Languages]], [[Indian literature|Literature]], [[Architecture of India|Architecture]], [[Cinema of India|Film]] & [[Television in India|TV]], [[Indian cuisine|Cuisine]], [[Public holidays in India|Holidays]], [[Folklore of India|Folklore]], [[Education in India|Education]], [[Media of India|Media]], [[Indian martial arts]]</small> ---- <div style="text-align:center;font-size:120%;">'''[[Science and technology in India|Science & Tech]]''' ----</div> <small> [[Indian Council of Agricultural Research]] (ICAR), [[Indian Institute of Astrophysics]], [[National Centre for Software Technology]], [[All India Institutes of Medical Sciences|AIIMS]], [[Indian Institute of Science|IISc]], [[Indian Institutes of Technology|IIT]], [[National Institutes of Technology|NIT]], [[Birla Institute of Technology and Science, Pilani |BITS-Pilani]], [[INRegistry]], [[Indian numbering system]], [[Indian Space Research Organisation]], [[National Internet Exchange of India]], [[International Crops Research Institute for the Semi-Arid Tropics|ICRISAT]], [[International Institute of Information Technology, Hyderabad]] </small> ---- <div style="text-align:center;font-size:120%;">'''Other''' ----</div> <small> [[Indian English]], [[Indian nationality law]], [[Indian numbering system|Numbering system]], [[Indian Space Research Organisation]], [[Telecommunications in India|Telecommunications]], [[National Highways Development Project]], [[Flag of India|Flag]], [[Vehicle registration plates of India|Vehicle registration plates]], [[Indian nationalism]], [[Metrication in India]]</small> 8fc754dedece564ec1978eb5a9dd6fd256fe2891 File:ARYAVARTPEDIA .png 6 22 27 2024-03-15T13:01:10Z Motzoid India 2 wikitext text/x-wiki ARYAVARTPEDIA a9f0623d8982f7f8af105728a873abef6543c36b Main Page 0 1 28 9 2024-03-15T13:03:23Z Motzoid India 2 Replaced content with "== ARYAVARTPEDIA == {{Main Page/Introduction}}{{Main Page/topics}}" wikitext text/x-wiki == ARYAVARTPEDIA == {{Main Page/Introduction}}{{Main Page/topics}} 61e7aebdf1c03e3449abc535a57cd0debd6c0dc9 35 28 2024-03-15T15:28:37Z Motzoid India 2 Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) wikitext text/x-wiki == ARYAVARTPEDIA == {{Main Page/Introduction}}{{Main Page/topics}} 61e7aebdf1c03e3449abc535a57cd0debd6c0dc9 Timeline of Indian history 0 23 29 2024-03-15T13:16:44Z Motzoid India 2 Created page with " This is a '''timeline of Indian history''', comprising important legal and territorial changes and political events in India and its predecessor states. To read about the background to these events, see History of India. also see the list of governors-general of India, list of prime ministers of India and Years in India. == Pre-historic India == === Pre-90th century BC === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |4,000,000 – 100,000 BCE |- | |Tools..." wikitext text/x-wiki This is a '''timeline of Indian history''', comprising important legal and territorial changes and political events in India and its predecessor states. To read about the background to these events, see History of India. also see the list of governors-general of India, list of prime ministers of India and Years in India. == Pre-historic India == === Pre-90th century BC === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |4,000,000 – 100,000 BCE |- | |Tools crafted by proto-humans that have been dated back two million years have been discovered in the northwestern subcontinent. The earliest archaeological site in the subcontinent is the palaeolithic hominid site in the Soan River valley. Soanian sites are found in the Sivalik region across what are now India, Pakistan, and Nepal. Some of the Bhimbetka rock shelters were inhabited by ''Homo erectus'' more than 100,000 years ago. Madrasian culture sites have been found in Attirampakkam (Attrambakkam=13° 13' 50", 79° 53' 20"), which is located near Chennai (formerly known as Madras), Tamil Nadu. Thereafter, tools related to this culture have been found at various other locations in this region. Bifacial handaxes and cleavers are typical assemblages recovered of this culture. Flake tools, microliths and other chopping tools have also been found. Most of these tools were composed of the metamorphic rock quartzite. The stone tool artifacts in this assemblage have been identified as a part of the second inter-pluvial period in India. Evidence for presence of Hominins with Acheulean technology 150,000–100,000 BCE in Tamil Nadu. Technology similar to contemporary artifacts found used by Homo sapiens in Africa found in Jwalapuram around 74000 BCE. Paleolithic industries in South India Tamil Nadu 30,000 BCE |} === 90th–50th century BCE === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |9,000 BCE |- | |Early Neolithic culture with first confirmed semi-permanent settlements appeared 11000 years ago in the Bhimbetka rock shelters in modern Madhya Pradesh, India. Some of the Stone Age rock paintings found among the Bhimbetka rock shelters are approximately 30,000 years old. The ancient history of the region includes some of Indian subcontinent's oldest settlements and some of its major civilisations. |} == Bronze Age India == Main article: Bronze Age India === 50th–40th century BCE === {| class="wikitable" !Year !Date !Event |- |4000 BCE | |Phase of the Indus Valley Civilisation begins. The civilization used an early form of the Indus signs, now called Indus script. Over the course of the next 1000–1500 years, inhabitants of the Civilization developed new techniques in handicraft (carnelian products, seal carving) and metallurgy (copper, bronze, lead, and tin) had elaborate urban planning, baked brick houses, efficient drainage systems, water supply systems, and clusters of large non-residential buildings. The civilization depended significantly on trade, was the first civilization to use wheeled transport in the form of bullock carts, and also used boats. |} === 30th century BCE-20th century BCE === {| class="wikitable" !Year !Date !Event |- |2800 BCE | |The Indus Valley Civilization expand across the whole of modern-day Pakistan, much of northern India, and large parts of Afghanistan, with Harappa and Mohenjo-daro becoming large metropolises. |- |2600 BCE | |End of the Early Indus Valley Civilization culture. Start of Mature Indus Valley Civilization culture | |} === 19th century BCE === {| class="wikitable" !Year !Date !Event |- |1900 BCE | |End of Mature Indus Valley Civilization culture, late Indus Valley Civilization period starts |} === 18th century BCE === {| class="wikitable" !Year !Date !Event |- |1800 BCE | |Adichanallur urn-burial site in Tirunelveli district in Tamil Nadu. In 2004, a number of skeletons dating from around 3,800 years ago. |} == Iron Age India == Main article: Iron Age in India === 17th century BCE === {| class="wikitable" !Year !Date !Event |- |1700 BCE | |Brihadratha also known as ''Maharatha'', was the initiator of the Brihadratha dynasty, the earliest ruling dynasty of Magadha. |- | | |Jarasandha was the son of Brihadratha and became the 2nd ruler of the ''Barhadratha'' dynasty of Magadha succeeding his father |- | | |Sahadeva of Magadha became the 3rd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Jarasandha |- |1661 BCE | |Somadhi became the 4th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sahadeva of Magadha |- |1603 BCE | |Srutasravas became the 5th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Somadhi |} === 16th century BCE === {| class="wikitable" !Year !Date !Event |- |1539 BCE | |Ayutayus became the 6th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Srutasravas |- |1503 BCE | |Niramitra became the 7th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Ayutayus |} === 15th century BCE === {| class="wikitable" !Year !Date !Event |- |1500 BCE | |Early Vedic period (to 1000 BCE) |- |1463 BCE | |Sukshatra became the 8th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Niramitra |- |1405 BCE | |Brihatkarman became the 9th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sukshatra |} === 14th century BCE === {| class="wikitable" !Year !Date !Event |- |1400 BCE | |Gopala Dynasty established by Gopa |- |1382 BCE | |Senajit became the 10th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Brihatkarman |- |1332 BCE | |Srutanjaya became the 11th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Senajit |} === 13th century BCE === {| class="wikitable" !Year !Date !Event |- |1300 BCE | |Cemetery H culture comes to an end |- |1300 BCE | |End of late Indus Valley Civilization period |- |1292 BCE | |Vipra became the 12th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Srutanjaya |- |1280 BCE | |Pundravardhana Kingdom was established sometime before 1280 BCE. |- |1257 BCE | |Suchi became the 13th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Vipra |} === 12th century BCE === {| class="wikitable" !Year !Date !Event |- |1200 BCE | |Rigveda Codified. Kuru Kingdom Established. |- |1199 BCE | |Kshemya became the 14th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Suchi |- |1171 BCE | |Subrata became the 15th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Kshemya |- |1107 BCE | |Dharma became the 16th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Subrata |} === 11th century BCE === {| class="wikitable" !Year !Date !Event |- |1043 BCE | |Dharma stepped down as the 16th ruler of the ''Barhadratha'' dynasty of Magadha. |- |1008 BCE | |Susuma became the 17th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Dharma |} === 10th century BCE === {| class="wikitable" !Year !Date !Event |- |1000 BCE | |Middle and Late Vedic period (to 500 BCE) |- |1000 – 300 BCE | |Kanchi district, gold mine of Megalithic sites in Tamil Nadu, South India |- |1000- 900 BCE | |Kingdom of Videha was established. |- |1000- 900 BCE | |Panchala Kingdom was established. |- |970 BCE | |Dridhasena became the 18th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Susuma |- |912 BCE | |Sumati became the 19th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Dridhasena |} === 9th century BCE === {| class="wikitable" !Year !Date !Event |- |879 BCE | |Subala became the 20th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sumati |- |877 BCE | |Birth of Parsvanatha, 23rd Jain Tirthankara (traditional date) |- |857 BCE | |Sunita became the 21st ruler of the ''Barhadratha'' dynasty of Magadha succeeding Subala |- |841 BCE | |Gopala Dynasty was de-established. |- |817 BCE | |Satyajit became the 22nd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sunita |} === 8th century BCE === {| class="wikitable" !Year !Date !Event |- |767 BCE | |Viswajit became the 23rd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Satyajit |- |732 BCE | |Ripunjaya became the 24th and the last ruler of the ''Barhadratha'' dynasty of Magadha succeeding Viswajit. |} === 7th century BCE === {| class="wikitable" !Year !Date !Event |- |700 BCE | |The Upanishads, a sacred text of Hinduism, are written. |- |700 BCE | |Kingdom of Kosala was established. Kosala belonged to the Northern Black Polished Ware culture (c. 700–300 BCE). |} === 6th century BCE === {| class="wikitable" !Year !Date !Event |- | rowspan="4" |600 BCE | |Sixteen Maha Janapadas ("''Great Realms''" or "''Great Kingdoms''") emerge. |- | |The Vedic period ends. |- | |The Chola, Pandya, and Chera dynasties are established. |- | |The capital of the Early Pandyan Kingdom was initially Korkai, all around 600 BCE, and was later moved to Koodal (now Madurai) during the reign of Nedunjeliyan I. |- |599 BCE | |Mahavira of the 24th Tirthankara is born. This turns out to become the most famous wave of Jainism. |- |563 BCE | |Siddhārtha Gautama, Buddha-to-be, is born in Lumbini into a leading royal family in the republic of the Shakyas, which is now part of Nepal. |- |543 BCE | |The Vanga-based Prince Vijaya (c. 543 BCE) married a daughter of the Pandyan king of Madurai, to whom he was sending rich presents every year. Sinhala chronicle Mahavamsa or the Great Chronicle of Sri Lanka mentions this event<sup>[''citation needed'']</sup> |- |538 BCE | |Cyrus the Great, founder of the Persian Achaemenid Empire reached up to northwestern parts of the Indian subcontinent, today's Afghanistan, which later proved to be his nemesis and caused his death. |- |527 BCE | |Nirvana of Mahavira, |- |525 BCE | |Kuru Kingdom was de-established. |} === 5th century BCE === {| class="wikitable" !Year !Date !Event |- |483 BCE | |Proposed Mahaparinirvana date of Gautama Buddha at Kushinagar. |} === 4th century BCE === {| class="wikitable" !Year !Date !Event |- |400 BCE | |Siddhartha Gautama 'Buddha' of the Shakya polity in S. Nepal, founds Buddhism (older date: 563–483 BCE) |- |350 BCE | |Panini, labelled as the father of linguistics, a resident of Gandhara, describes the grammar and morphology of Sanskrit in the text Ashtadhyayi. Panini's standardized Sanskrit is known as Classical Sanskrit. |- |333 BCE | |Persian rule in the northwest ends after Darius 3 is defeated by Alexander the Great, who establishes the Macedonian Empire after inheriting the Persian Achaemenid Empire. |- | rowspan="2" |326 BCE | |Ambhi king of Takshila surrenders to Alexander. |- | |Porus who ruled parts of the Punjab, fought Alexander at the Battle of the Hydaspes River. |- |321 BCE | |Maurya Empire is founded by Chandragupta Maurya in Magadha after he defeats the Nanda dynasty and Macedonian Seleucid Empire. Mauryan capital city is Pataliputra (Modern Patna in Bihar) |- |305 BCE | |Chandragupta Maurya defeats Seleucus Nicator of the Seleucid Empire. |- |304 BCE | |Seleucus gives up his territories in the subcontinent (Afghanistan/Baluchistan) to Chandragupta in exchange for 500 elephants. Seleucus offers his daughter in marriage to Chandragupta to seal their friendship. |} == Classical India == Main article: Middle kingdoms of India === 3rd century BCE === {| class="wikitable" !Year !Date !Event |- |290 BCE-270 BCE | |Pingala, ancient Indian mathematician and poet writes the ''Chandaḥśāstra'' (also called the Pingala-sutras), which presents the first known description of a binary numeral system. |- |273 BCE | |Ashoka the Great regarded as the greatest ancient Indian emperor, grandson of Chandragupta Maurya, ascends as emperor of the Maurya Empire. |- |266 BCE | |Ashoka conquers and unifies most of Indian subcontinent, along with most of Afghanistan and Balochistan. |- | rowspan="2" |265 BCE | |Kalinga War takes place between Ashoka and the kingdom of Kalinga. |- | |After conquering Kalinga, Ashoka who recently converted into buddhism and made it a quasi-official state religion of the Mouryan Empire, reportedly regrets what he has done and relinquishes violence. |- |261 BCE | |Conquest of Kalinga |- |260 BCE | |Ashoka inscribes the Edicts of Ashoka, written down using Brahmi script. The Edicts describe his Buddhist religious views and his commitment to the welfare of his subjects. |- |232 BCE | |Ashoka dies and is succeeded by Kunala. |- |230 BCE | |Simuka declares independence from Mauryan rule and establishes the Satavahana Empire. |} === 2nd century BCE === {| class="wikitable sortable mw-collapsible" !Year !Date !Event |- | rowspan="3" |200 BCE | |Kuninda Kingdom is established. |- | |Tolkāppiyam describes the grammar and morphology of Tamil; it is the oldest existing Tamil grammar (dates vary between 200 BCE and 100 CE). |- | |Indo-Greek Kingdom (also known as the Yavana Kingdom) is established. It was a Hellenistic-era Greek kingdom covering various parts of Afghanistan and the northwestern regions of the Indian subcontinent (parts of modern-day Pakistan and northwestern India). The kingdom was founded when the Graeco-Bactrian king Demetrius (and later Eucratides) invaded India from Bactria in 200 BCE. During its existence, the kingdom was ruled over by 30 successive kings, with Menander I being the most famous Indo-Greek king. |- |184 BCE | |The Mauryan Empire, declines |- |165/155 BCE | |Menander I becomes the king of the Indo-Greek Kingdom. Menander is noted for having become a patron and convert to Greco-Buddhism and he is widely regarded as the greatest of the Indo-Greek kings. |} === 1st century BCE === {| class="wikitable" !Year !Date !Event |- |100 BCE | |Birth of Charaka, ancient Indian physician who writes the Charaka Samhita, an ancient text that describes theories on human body, etiology, symptomology and therapeutics for a wide range of diseases and is based on the ''Agnivesha Samhitā''. |- |65 BCE | |The Pandyan king sends ambassadors to the Greek and Roman lands. |- |58 BCE | |Beginning of Vikram Era |- |1 BCE | |Fall of the Indo-Greek Kingdom. |} === 1st century === {| class="wikitable" !Year !Date !Event |- |35 | |Western Satraps formed. |- |52 | |St. Thomas arrives in Muziris (modern-day North Paravur and Kodungalloor in Kerala State, India). |- |68 | |Establishment of the Kushan Empire by Kujula Kadphises. |- |79 | |Gautamiputra Satkarni becomes Satavahana emperor and starts Shalivahana era calendar after defeating Scythian king Maues. |- |100 or after | |Sugar was first produced from sugarcane plants in northern India sometime after the first century. |} === 2nd century === {| class="wikitable" !Year !Date !Event |- |113 | |Vima Kadphises becomes the ruler of the Kushan Empire. He was the Kushan Emperor to first introduce gold coinage, in addition to the existing silver and copper coinage. |- |127 | |Kanishka ascends the throne of the Kushan Empire, succeeding Vima Kadphises. Under his reign, the Kushan Empire reached its zenith. |} === 3rd century === {| class="wikitable" !Year !Date !Event |- |240 | |Sri-Gupta starts the Gupta Empire in Magadha, with its capital in Pataliputra |- |250 | |The Vakataka Dynasty in the Deccan is formed by Vindyashakti. He rules until 275. |- | rowspan="2" |275 | |The Pallava dynasty is established |- | |Pravarasena ascends the throne of the Vakataka Dynasty, expanding his empire. He was the first Vakataka ruler who called himself a ''Samrat,'' or emperor. He is perhaps the only emperor in his dynasty. |} === 4th century === {| class="wikitable" !Year !Date !Event |- |320 | |Chandragupta I ascends the Gupta throne. |- |335 | |Samudragupta ascends the Gupta throne and expands the empire. |- |345 | |Kadamba Kingdom established by Mayurasharma, Banavasi as its capital and they were the first kingdom to use Kannada in administration. |- |380 | |Chandragupta II, Samudragupta's son becomes the Gupta Emperor. |- |390 | |Prabhavatigupta, a Gupta Princess who was the daughter of Chandragputa II, becomes the regent of the Vakataka dynasty after the death of her husband Rudrasena II, effectively ruling the Vakatakas until 410. |} === 5th century === {| class="wikitable" !Year !Date !Event |- |413 | |Kumaragupta I, Adopted the title of Mahendraditya. |- |455 | |Skandagupta, Faced Hunas effectively. |- |467 | |Invasions by the Huna. Pallavas became a major power during the reign of Mahendravarman I (571 – 630 CE) |- |475 | |Harishena takes over the Vakataka Dynasty. He was a great patron of Buddhist Art. The World Heritage monument Ajanta Caves is a surviving example of his works. |- |476 | |Birth of Aryabhata, ancient Indian mathematician and astronomer who goes on to write the Aryabhatiya, a Sanskrit astronomical treatise and the Arya-siddhanta. |} == Medieval India == Main article: Medieval India === 6th century === {| class="wikitable" !Year !Date !Event |- |502 | |Mihirakula becomes the ruler of the Alchon Huns. He was the second and last of the Alchon Huns. He was considered to be an extremely violent and cruel ruler. He destroyed many Buddhist monasteries in his kingdom. |- |528 | |Confederation of Indian rulers Yashodharman, Narasimhagupta and Adityavardhana defeat the Huna emperor Mihirakula in the Battle of Sondani. |- |528–540 | |Yashodharman conquers vast territories from the Hunas and Guptas after the Battle of Sondani, and establishes the short-lived Aulikara Empire |- |554 | |Collapse of Gupta Empire after the death of Vishnugupta. |- |573 | |Varāhamihira, ancient Indian astrologer, astronomer, and polymath writes the Pañcasiddhāntikā, a treatise on mathematical astronomy which summarises five earlier astronomical treatises by five authors. |} === 7th century === {| class="wikitable" !Year !Date !Event |- |606 | |Harshavardhana crowned Monarch. |- |628 | |Ancient Indian mathematician and astronomer Brahmagupta completes the Brāhmasphuṭasiddhānta, a text on mathematical astronomy explaining the role of zero, rules for manipulating both negative and positive numbers, a method for computing square roots, methods of solving linear and quadratic equations, and rules for summing series, Brahmagupta's identity, and Brahmagupta's theorem. Brahmagupta also first describes gravity as an attractive force, and uses the term "gurutvākarṣaṇam (गुरुत्वाकर्षणम्)]" in Sanskrit to describe it. |- |637 | |Badami Chalukya power at its peak. Pulakeshin II pushes north up to the Narmada and defeats the invading Harshavardhana of Kanauj |- |647 | |Death of Harshavardhana |- |665 | |Ancient Indian mathematician and astronomer Brahmagupta completes the astronomical treatise Khandakhadyaka covering topics such as the longitudes of the planets, diurnal rotation, lunar and solar eclipses, risings and settings, the moon's crescent and conjunctions of the planets. |} === 8th century === {| class="wikitable" !Year !Date !Event |- |700 | |According to the Qissa-i Sanjan, the immigrants Parsi are granted permission to stay by the local ruler Jadi Rana |- |711 | |Arab commander of the Umayyad Caliphate, Muhammad ibn Qasim defeats Raja Dahir, king of Sindh Region in modern-day Pakistan |- |728 | |Narasimhavarman II of the Pallava dynasty constructs the Shore Temple of Mamallapuram |- |736 | |Delhi is re-established by Bilan Deo Tomar also known as Anangpal Tomar |- |738 | |Confederacy of Indian kings consisting of Nagabhata I of Gurjara-Pratihara dynasty and Bappa Rawal, ruler of Mewar defeat Arab Umayyad Caliphate invasion attempts in the Battle of Rajasthan (738 CE) |- |739 | |Avanijanashraya Pulakeshin of the Chalukyas of Navasarika kingdom defeats an invasion attempt by the Arab Umayyad Caliphate. |- |753 | |Establishment of Rashtrakuta Kingdom of Manyakhet by Dantidurga by defeating Chalukyas of Badami |- |753 | |Saindhava naval fleet defeats Arab naval fleet sent by the Arab governor of Sindh. |- |776 | |Saindhava naval fleet under Agguka I defeats second Arab naval expedition. |- |788 | |Birth of Adi Shankara |} === 9th century === {| class="wikitable" !Year !Date !Event |- |800 | |Vikramashila University is established by the Pala emperor Dharmapala in present-day Bhagalpur district in Bihar, in early 9th century |- |814 | |Nripatunga Amoghavarsha I becomes Rashtrakuta emperor. Kannada literature flourishes. |- |836 | |Gurjara-Pratihara (to 910) |} === 10th century === {| class="wikitable" !Year !Date !Event |- |935 | |Chandrapur University established in 935 CE by Srichandra, a ruler of the Chandra dynasty |- |985 | |Rajaraja Chola ascends to the throne of Chola empire. He expands the empire to Sri Lanka and to the north to include Kalinga kingdom |- |993 | |Rajaraja Chola invades Sri Lanka and captures the northern half of Sri Lanka. |} === 11th century === {| class="wikitable" !Year !Date !Event |- |1000 | |Invasion of Mahmud of Ghazni Begins(1000–1025) CE |- |1003–1010 | |The Brihadisvara Temple, Thanjavur is built by Raja Raja Chola I. |- | rowspan="2" |1014 | |Rajaraja Chola adds the Lakshadweep and Maldives islands to the Chola empire. |- | |Rajendra Chola I became the king of Chola empire after his father Rajaraja Chola. During his reign, he extended the influences of the already vast Chola empire up to the banks of the river Ganges in the north and across the ocean. Rajendra's territories extended coastal Burma, the Andaman and Nicobar Islands, Lakshadweep, Maldives, conquered the kings of Srivijaya (Sumatra, Java and Malay Peninsula in South East Asia) and Pegu islands with his fleet of ships. He defeated Mahipala, the Pala king of Bengal and Bihar, and to commemorate his victory he built a new capital called Gangaikonda Cholapuram. The Cholas became one of the most powerful dynasties in Asia during his reign. The Tamil Chola armies exacted tribute from Thailand and the Khmer kingdom of Cambodia. Rajendra Chola I was the first Indian king to take his armies overseas and make conquests of these territories, even though there is epigraphical evidence of Pallava presence in these very areas. |- |1014 | |Mahmud Ghazni defeats the Hindu Shahi king Trilochanapala and annexes Punjab. He then attempts to invade Kashmir, but is defeated by Samgrāmarāja |- |1017 |26 April |Ramanuja is born at Sriperumbudur, Tamil Nadu. |- |1021 | |Mahmud of Ghazni again attempts to invade Kashmir, but is defeated by Samgrāmarāja |- |1025 |30 April |Last invasion of Mahmud Ghazni, sacked and destroyed temple of Somnath |- |1027 | |The Sun Temple of Modhera is completed by Bhima I of the Chaulukya dynasty |- |1030 |30 April |Alberuni arrives in India; death of Mahmud of Ghazni |- |1033 |15 June |Suhaldev, king of Shravasti defeats and kills Ghazi Saiyyad Salar Masud, nephew of Mahmud of Ghazni. |- |1035 | |The Brihadisvara Temple, Gangaikonda Cholapuram is built by Rajendra Chola I. |- |1058 | |Soomra dynasty ends the Arab domination and establishes its own rule over Sindh. |} === 12th century === {| class="wikitable" !Year !Date !Event |- |1120 | |Kalyani Chalukyas power at its peak. Vikramaditya VI ushers in ''Vikrama Chalukya era''. |- |1121 | |Ajayaraja II, of the Chahamanas of Shakambhari dynasty repulse Ghaznavid invasions. |- |1134 | |Life of Basaveshwara, philosopher and social reformer. (to 1196) |- |1149 |30 September |Birth of the Great poet and writer of India Chand Baradai in Lahore |- |1150 | |Bhāskara II, mathematician and astronomer writes the Siddhānta Shiromani, consisting of three books Līlāvatī on arithmetic and measurement, Bijaganita on algebra and ''Gaṇitādhyāya and Golādhyāya'' on astronomy. |- |1157 | |The Kalachuris of Kalyani under Bijjala II capture Kalyani |- |1175 | |Muhammad of Ghor invades India. |- |1178 | |Forces of the Chaulukya king Mularaja II led by his regent mother Naikidevi defeat Ghurid invaders led by Muhammad of Ghor who escapes back to Ghazni, in the Battle of Kasahrada. |- |1191 | |First Battle of Tarain between Mohammed Ghori and Prithviraj III. Ghori is defeated by Prithivi Raj Chauhan III. |- |1192 | |Second Battle of Tarain fought between Muhammed Ghori and Prithviraj Chauhan III. Prithviraj Chauhan III is defeated by Mohammed Ghori. |- |1193 | |Muslim general Muhammad bin Bakhtiyar Khalji destroys the ancient university of Vikramashila |- |1194 | |Battle of Chandawar fought between Muhammad of Ghor and Jaichand of Kannauj. Ghori defeated Jayachandra and killed him. |} === 13th century === {| class="wikitable" !Year !Date !Event |- |1206 |15 March |Khokhars killed Muhammad Ghori during a raid on his camp on the Jhelum River. Marks the end of 14 Years of Ghurid rule over northern India (1192–1206). |- |1206 |12 June |Qutb ud-Din Aibak establishes slave Dynasty (Mamluk) later to be known as Delhi Sultanate. Marks Beginning Of Delhi Sultanate of 320 Years over India(1206–1526). |- |1206 | |Raja Prithu defeats Muhammad Bakhtiyar Khalji, destroying his army of 12,000 with only about 100 survivors. |- |1210 | |Qutb-ud-din Aibak died while playing polo. |- |1210 | |Shams ud-Din Iltutmish;was the third ruler of the Delhi Sultanate, belonging to the Mamluk dynasty (Slave Dynasty). He introduced IQTA (Tax, revenue) system. Died in 1236 |- |1211–1215 | |Anangabhima Deva III of the Eastern Ganga dynasty in present-day Odisha defeats invasions by Ghiyāth ad-Dīn ʿIwaz Khalji the ruler of Bengal. |- |1221 | |Genghis Khan invades Punjab in pursuit of the fleeing Khwarezm Shah Jalal ad-Din Mingburnu and defeats him in the Battle of the Indus. |- |1226 | |Raja Prithu repulses invading forces of Ghiyas ud din Balban the ninth sultan of the Mamluk dynasty of Delhi, in present-day Assam |- |1229 | |Sandhya (ruler of Kamarupa) in present-day Assam drives Muslims out of his territory and captures territory till Karatoya river. Thereafter, to avenge previous defeats, he invades the western border of Gaur (Lakhnauti) and annexes regions across the Karatoya into his kingdom. |- |1236 | |Narasingha Deva I ruler of the Eastern Ganga dynasty in present-day Odisha launches attacks against the Turko-Afghan rulers of Mamluk dynasty in Bengal that had captured Bihar and Bengal and not only repulses their attacks, but pushes them as far back as Padma River in current-day Bangladesh. |- |1236 |10 November |Rule of Razia Sultana – Daughter of Iltutmish. |- |1238 |October |Sri Madhwacharya born in Pajaka near Udupi, Karnataka |- |1240 |14 October |Murder of Razia Sultan by Turkish nobles.(Chalisa) |- |1243 | |Narasingha Deva I ruler of the Eastern Ganga dynasty defeats Tughral Tughan Khan of the Mamluk Sultanate of Delhi in the Battle of Katasin and annexes several districts of Bengal into his empire. |- |1246–66 | |Rule of Nasiruddin Mahmud with support of Balban (Wazir and powerful member of Chalisa). Chalisa- a council of 40 members |- |1250 | |The Konark Sun Temple is completed, built by Narasingha Deva I. |- |1257 | |The Kamrup kingdom, led by its ruler Sandhya defeats and executes Malik Ikhtiyaruddin Yuzbak, the Mamluk Governor of Bengal. His domains are split between the Kamrup kingdom and Narasimhadeva I of the Eastern Ganga Empire. |- |1266–1286 | |Rule of Balban; Chalisa wiped out. |- |1267 | |The Mahanubhava philosophy established by Chakradhar Swami. |- |1275 | |Birth of saint Dnyaneshwar. |- |1290 | |Murder of Muiz ud din Qaiqabad by Jalaluddin Firuz Khalji, an army commander. |- |1290–96 | |Jalal-ud-din Khilji. Founder of Khiliji Dynasty |} === 14th century === {| class="wikitable" !Year !Date !Event |- |1309 | |Alauddin Khalji sends Malik Kafur to South. Malik Kafur Lays siege on the Kakatiya Capital Warangal and Extracts Tribute. The diamond Kohinoor was among the loot collected. |- |1310 | |Ala-ud-din Khilji's army under Malik Kafur occupies Devagiri ending the Seuna Yadava Kingdom |- |1311 | |Malik Kafur attacks the Hoyasalas. In the aftermath of the destruction Hoyasalas abandon the old capital Halebidu. He later attacks Madurai. The attacks on Warangal, Halebidu and Madurai is accompanied by wide scale killing, destruction of temples and repatriation of wealth back to Delhi. |- |1323 | |Ulugh Khan (Muhammad bin Tughluq) defeats Prataparudra II ending the Kakatiya dynasty |- |1333 | |Prithvi Chand II of the Hindu Katoch kingdom of Kangra defeats the army of Muhammad bin Tughluq who loses nearly all his 10,000 soldiers and is forced to retreat. |- |1334 | |Musunuri Kapaya Nayaka with assistance from the Hoysala ruler Veera Ballala III leads a rebellion against the Tughluq rule of Delhi Sultanate, driving it out of Warangal region in present-day Telangana. |- | rowspan="2" |1336 | |Vijayanagara Empire established by Harihara I and his brother Bukka Raya I. |- | |Rana of Mewar Hammir Singh defeats and captures Tughlaq dynasty ruler Muhammad bin Tughluq in the Battle of Singoli. |- |1340 | |Birth of great mathematician Madhava of Sangamagrama who goes on to found the Kerala school of astronomy and mathematics and write the Venvaroha, which describes the methods for the computation of the true positions of the Moon at intervals of about half an hour for various days in an anomalistic cycle. |- |1343 | |Veera Ballala III captured and killed in the Battle of Kannanur. |- |1347 | |Governor Hasan Gangu revolts against Muhammad bin Tughluq founding the Bahmani Sultanate |- |1351 | |Samma Dynasty assumes rule over Sindh |- |1370 | |Bukka, the Vijayanagara ruler and his son Kumara Kamapna capture the entire Tamil speaking parts. |- |1398 | |Timur plunders Lahore |} === 15th century === {| class="wikitable" !Year !Date !Event |- |1401 | |Dilawar Khan establishes the Malwa Sultanate in present-day northern India |- |1407 | |Zafar Khan: governor of Gujarat, declares himself as Sultan Muzaffar Shah founding the Gujarat Sultanate/Muzaffarid dynasty |- |1414 | |Khizr Khan, deputized by Timur to be the governor of Multan takes over Delhi founding the Sayyid dynasty |- |1424 | |Deva Raya II succeeded his father Veera Vijaya Bukka Raya as monarch of the Vijayanagara Empire |- |1437 | |Rana Kumbha of Mewar and Rao Ranmal Rathore of Marwar defeat and take prisoner Mahmud Khalji, Sultan of the Malwa Sultanate in the Battle of Sarangpur |- |1442 | |Rana Kumbha of Mewar defeats Mahmud Khalji in the Battle of Mandalgarh |- |1443 | |Abdur Razzaq visits India |- | rowspan="2" |1446 | |Rana Kumbha of Mewar defeats Mahmud Khalji in the Battle of Banas |- | |Mallikarjuna Raya succeeds his father Deva Raya II |- |1449 |26 September |Sankardev, founder of Ekasarana Dharma was born in Nagaon, Assam. |- |1450 | |Shri Guru Ravidas Ji was born in 1450 in Varanasi. He was an Indian mystic poet-sant of the Bhakti movement during the 15th to 16th century CE. Venerated as a guru in the region of Punjab, Uttar Pradesh, Rajasthan, Maharashtra and Madhya Pradesh, the devotional songs of Ravidas have had a lasting impact upon the bhakti movement. |- |1451 |19 April |Bahlul Khan Lodhi ascends the throne of the Delhi sultanate starting the Lodhi dynasty |- |1456 | |Rana Kumbha of Mewar defeats the combined armies of Shams Khan (sultan of Nagaur) and Qutbuddin Ahmad Shah II (Sultan of Gujarat) in the Battle of Nagaur and captures Nagaur, Kasili, Khandela and Shakambhari. Nagaur Sultanate ceases to exist. |- |1469 |15 April |Guru Nanak, the founder of Sikhism is born |- |1483 |14 February |Birth of Babur in Andijan, Fergana Valley in Central Asia |- |1485 | |Saluva Narasimha Deva Raya drives out Praudha Raya ending the Sangama Dynasty |- |1486 | |Advent of Chaitanya Mahaprabhu, founder of Gaudiya Vaishnavism and leader of the world's first civil disobedience movement, in Navadwip, West Bengal |- |1490 | |Ahmadnagar declares independence, followed by Bijapur and Berar in the same year thus breaking up the Bahmani Sultanate. |- |1492 |30 March |Satal Rathore of Marwar kills Afghan warlord Gudhla Khan in the Battle of Peepar, to rescue 140 girls abducted by the Afghans. He later succumbs to injuries sustained in the battle. |- |1498 |20 May |Vasco de Gama was the first portage's sailor first voyage from Europe to India and back (in 1499) |} == Colonial India == Main article: Colonial India === 16th century === {| class="wikitable" !Year !Date !Event |- |1503 | |Kingdom of Cochin is taken over by the Portuguese creating the first European settlement in India. |- |1508 |3 February |The Christian-Islamic power struggle in Europe and the Middle East. Spills over into the Indian Ocean as Battle of Chaul during the Portuguese-Mamluk War |- |1509 |3 February |Battle of Diu marks the beginning of the dominance of the Europeans in the Asian naval theater. |- |1510 |20 May |Portuguese India (to 1961) |- |1518 | |Kingdom of Mewar under Rana Sanga defeats Lodi Empire under Ibrahim Lodhi in the Battle of Khatoli, gains control over north eastern Rajasthan. |- |1519 | |Kingdom of Mewar under Rana Sanga defeats the Malwa Sultanate and the Gujarat Sultanate in the Battle of Gagron, obtains control of Malwa. |- |1519 | |The Kingdom of Mewar under Rana Sanga again defeats Lodi Empire under Ibrahim Lodi in the Battle of Dholpur, extends control up to Agra. |- | rowspan="3" |1520 | |Vijayanagara Empire under Krishnadevaraya defeats the Sultanate of Bijapur in the Battle of Raichur. |- | |Rana Sanga leads a coalition of Rajput armies to invade the Gujarat Sultanate, reinstates Raimal as the Rao of Idar. The Sultan of Gujarat is forced to flee to Muhammadabad. |- | |Death of mystic poet-sant of the Bhakti movement Shri Guru Ravidas. |- |1522 | |Portuguese land on the Coromandel Coast |- |1523 | |Portuguese explorers established Santhome Church above the Tomb of Saint Thomas the Apostle in Chennai. |- |1526 |21 April |Sultan Ibrahim Lodi, of the Delhi Sultanate, angers local nobles, who respond by inviting Babur, the Mughal ruler of Kabul, to invade Delhi and Agra. The local population, plus the possession of artillery, assists Babur in killing the Sultan (whose soldiers desert him) at the Battle of Panipat. Marks the Beginning of Mughal Empire for 231 Years Rule Over India (1526–1757) CE. |- |1527 |17 March |Babur bribes Mewar general Silhadi promising Silhadi a kingdom, if Silhadi betrays Mewar King Rana Sanga in Battle of Khanwa, thus leading to the annexation of Mewar. |- | rowspan="2" |1530 | |Astronomer-mathematician Jyeṣṭhadeva of the Kerala school of astronomy and mathematics writes the Yuktibhāṣā, a major treatise on mathematics and astronomy in Malayalam |- |28 March,27 January |Babur completes his Baburnama, reflecting on society, politics, economics, history, geography, nature, flora and fauna, which to this day is a standard textbook in 25 countries. Babur dies, and is succeeded by his son Humayun. |- |1532 | |Ahoms under king Suhungmung defeat Turbak Khan of the Bengal Sultanate in Battle of Hatbor. |- | rowspan="2" |1539 | |Battle of Chausa fought between Humayun and Sher Shah Suri in which Humayun defeated. |- | |Guru Angad Dev becomes second guru of Sikhs. |- | rowspan="2" |1540 |18 September |Battle of Kannauj fought between Humayun and Sher Shah Suri and Humayun was completely defeated. Humayun lost the Mughal empire to Afghans (Suri Dynasty), and passed 12 years in exile. |- |9 May |Birth of Maharana Pratap Singh of Mewar ( son of Maharana Udai Singh II ) |- |1542 |15 October |Birth of Akbar at Umerkot. |- |1545 |22 May |Death of Sher Shah Suri and succeeded by Islam Shah Suri. |- |1552 |26 March |Guru Amar Das becomes third Guru of Sikhs. |- |1554 |22 November |Death of Islam Shah Suri. |- |1555 |22 May |Humayun regained the throne of Delhi from the hands of weak successors of Sher Shah. |- | rowspan="3" |1556 |27 January |Humayun converts from Sunni Islam to Shia Islam, to gain the alliance of the Shah of Persia. Humayun dies, and is succeeded by his son Akbar. |- |7 October |Hindu king Hemu defeats Mughal forces in the Battle of Tughlaqabad |- |5 November |Hindu king Hemu establishes 'Hindu Raj' in North India and bestowed with title of "Vikramaditya"; Second Battle of Panipat fought between Hemu and Akbar's forces in which Hemu is killed. |- |1565 |26 January |Battle of Talikota results in the rout of Vijayanagara empire. |- |1568 | |Paradesi Synagogue, the first Jewish synagogue in India constructed by the Paradesi Jews. |- |1572 | |Akbar annexes Gujarat, also shifts the Mughal capital to Fatehpur Sikri where a new township and citadel containing buildings of a unique all-India character—inspired by the architecture of Bengal, Gujarat, Malwa, Kashmir as well as the Timurid world—is born. |- | rowspan="2" |1574 |1 September |Guru Ram Das becomes fourth Guru of Sikhs. |- | |Akbar annexes Bengal. |- |1581 |1 September |Guru Arjan Dev becomes fifth Guru of Sikhs. |- |1582 | |Maharana Pratap defeats Mughal Forces of Akbar in Battle of Dewair in present-day Rajasthan |- |1586 |6 October |Akbar annexes Kashmir. |- |1589 | |Harmandir Sahib (Golden Temple) build in Amritsar by Guru Arjan |- |1600 |31 December |East India Company is formed in England. Gets exclusive trading rights with India. |} === 17th century === {| class="wikitable" !Year !Date !Event |- |1602 | |Dutch came to India at Pulicut (back to 1825). |- |1605 |27 October |Akbar dies, and is succeeded by his son Jahangir. |- | rowspan="2" |1606 |25 May |Guru Hargobind is selected to becomes the sixth guru of Sikhs by Guru Arjan |- |30 May |Guru Arjan is tortured and killed under orders of Mughal Emperor Jahangir for refusing to convert to Islam. |- | rowspan="2" |1612 |30 November |British India (to 1947) |- |24 August |East India Company enters into a trade agreement with the Mughal Emperor Jahangir |- |1616 | |Susenghphaa, ruler of the Ahom kingdom defeats Mughal forces in a land and naval battle at Bharali, Assam. |- |1621 | |Sikhs army led by Guru Hargobind defeat Mughals in the Battle of Rohilla |- |1628 | |Jahangir announces "Chain of Justice" outside his palace that anyone can ring the bell and get a personal hearing with the emperor. Jahangir dies, and is succeeded by his son Shah Jahan. |- |1630 |19 February |Birth of Chhatrapati Shivaji Maharaj. |- |1634 |14 April |Sikhs army led by Guru Hargobind defeat Mughals in the Battle of Amritsar (1634) |- |1634 |15 October |Sikhs army of 2000 led by Guru Hargobind defeat a Mughal army of 36000 in the Battle of Lahira and kill the Mughal generals Qumar Beg and Lala Beg. |- |1635 |25 April |Sikhs army of 1800 led by Guru Hargobind defeat a Mughal army of 52000 in the Battle of Kartarpur |- | rowspan="2" |1644 |8 March |Guru Har Rai becomes seventh guru of Sikhs |- | |Chhatrapati Shivaji Maharaj takes oath of Independence at Raireshwar. |- |1640 | |Rani Karnavati of the Garhwal Kingdom repels and defeats invasion attempt by Mughal army of Shah Jahan. |- |1658 | |Shah Jahan completes Taj Mahal, Jama Masjid, and Red Fort. Imperial treasuries drained by architectural and military overexpenditures. Shah Jahan put under house arrest, and is succeeded by his son Aurangzeb. |- | rowspan="2" |1659 |19 February |Chhatrapati Shivaji Maharaj's ill-equipped and small Maratha army defeat numerically much larger Adilshahi troops at the Battle of Pratapgarh marking the first victory of the Maratha Empire. Chhatrapati Shivaji Maharaj personally kills Adilshahi commander Afzal Khan (general). |- |27 December |Marathas under Chhatrapati Shivaji Maharaj defeat the Adilshahi troops in the Battle of Kolhapur |- |1660 |13 July |Maratha army of 600 defeats a much larger army of the Bijapur Sultanate of 10,000 in the Battle of Pavan Khind, near the city of Kolhapur. |- | rowspan="2" |1661 |3 February |Marathas under Chhatrapati Shivaji Maharaj defeat Mughal Empire forces in the Battle of Umberkhind. |- |6 October |Guru Har Krishan becomes eight guru of Sikhs. |- |1664 |6–10 January |Marathas under Chhatrapati Shivaji Maharaj defeat Mughal Empire forces in the Battle of Surat. |- | rowspan="2" |1665 |13 February |Chhatrapati Shivaji Maharaj conducts a raid on the Portuguese colony in Basrur and gains a large booty which enables him to strengthen the base of his new kingdom by building a strong navy and forts. |- |20 March |Guru Tegh Bahadur becomes ninth Guru of Sikhs. |- |1665 |11 June |Treaty of Purandar (1665) (or पुरंदर चा तह) was signed on 11 June 1665, between Chhatrapati Shivaji Maharaj and the Rajput ruler Jai Singh I. |- |1669 |28 November |Jats defeats the Mughal Empire in the Battle of Tilpat takes control of Mathura |- |1670 |4 February |Marathas under Chhatrapati Shivaji Maharaj capture the fort of Sinhagad (then known as Kondhana) from the Mughals in the Battle of Sinhagad. |- | rowspan="2" |1671 | |Ahom kingdom defeats the Mughal Empire in the Battle of Saraighat, takes back control of Guwahati |- | |Chhatrasal revolts against the Mughal Empire with an army of only 5 horsemen and 25 swordsmen. In ten years he conquers a large tract of land between Chitrakoot, Chhatarpur and Panna in the east and Gwalior in the west, and from Kalpi in the north to Sagar, Garhakota, Shahgarh and Damoh in the south. |- |1672 |February |Maratha forces under Prataprao Gujar defeat a Mughal army twice its size in the Battle of Salher |- |1674 |6 June |Shivaji is crowned Chhatrapati. |- | rowspan="2" |1675 |6 May |Marathas defeat the Bijapur Sultanate and capture the Fortress of Ponda after the Siege of Ponda |- |24 November |Guru Tegh Bahadur, the ninth Guru of Sikhs is tortured and executed in Delhi by the order of Aurangzeb for his support for the Kashmiri Hindus to practice their religion and for refusing to convert to Islam. Guru Gobind Singh becomes tenth Guru of Sikhs. |- | rowspan="3" |1680 |3 April |Chhatrapati Shivaji Maharaj dies of fever at Raigad. |- |20 July |Sambhaji becomes 2nd Chhatrapati of the Maratha Empire |- | |Kingdom of Venad defeats the Mughal Empire in the Battle of Manacaud |- | rowspan="2" |1681 | |Aurangzeb invades the Deccan |- |31 January – 2 February |Maratha ruler Chhatrapati Sambhaji Maharaj attacks and sacks the Mughal city Burhanpur |- |1682 |August |Ahom kingdom defeats the Mughal Empire in the Battle of Itakhuli, takes back control of Kamrup region |- |1684 | |Marathas under Chhatrapati Sambhaji Maharaj repel a Mughal attempt to invade Konkan. Mughals are forced into a slow retreat and suffer great losses. |- |1687 |16 December |Marathas under Chhatrapati Sambhaji Maharaj defeat the Mughal Army in the Battle of Wai. However, Maratha General Hambirrao Mohite is killed. |- |1688 | |The Sikandara was plundered by Rajaram Jat. Even the skeleton of Akbar, was taken out and the bones were consumed to flames. |- |1689 |11 March |After being ambushed and captured by the Mughals, Chhatrapati Sambhaji Maharaj is tortured and killed for refusing to convert to Islam. Rajaram I becomes the third Chhatrapati of the Maratha Empire. |- |1690 | |Maratha Empire defeats the Mughal Empire in the Battle of Athani |- |1691 | |Joint forces of Bhim Chand (Kahlur) of Bilaspur and Guru Gobind Singh defeat Mughal army in the Battle of Nadaun. |- |1692 |December |Maratha General Santaji Ghorpade defeats Mughal General Alimardan Khan and captures him. Mughal army under Zulfikhar Ali Khan defeated by Santaji and Dhanaji Jadhav and Zulfiquar Khan is forced to sue King Rajaram for peace |- |1693 |21 November |Maratha General Santaji Ghorpade defeats Mughal General Himmat Khan. |- |1695 |20 November |Maratha General Santaji Ghorpade defeats and kills Mughal General Kasim Khan. |- | rowspan="2" |1696 | |Sikhs under Guru Gobind Singh defeat Mughal forces in the Battle of Guler (1696) |- |20 November |Danish India (to 1869) |- |1699 |3 October |Guru Gobind Singh, the 10th Guru of Sikhs creates Khalsa, the saint-soldier at Anandpur Sahib, Punjab. |} === 18th century === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |1700 | |Sikhs army of 1000 under Guru Gobind Singh defeats Mughal army numbering 10,000 in the Battle of Anandpur (1700) |- |3 March |Rajaram I dies. The infant Shivaji II becomes the Chhatrapati of the Maratha Empire, with his mother Tarabai as the regent. She continues the Maratha battles against the Mughal Empire, leading the Maratha army herself. |- |1702 | |Sikhs army under Guru Gobind Singh defeats Mughal army in the Battle of Nirmohgarh (1702) |- | rowspan="2" |1707 |13 February |Birth of Suraj Mal son of Badan Singh |- |3 March |Death of Aurangzeb the Mughal monarch. Marks the end of Mughal Territorial Expansion over India. |- |1708 |7 October |Guru Gobind Singh is assassinated by Mughals and the Guru Granth Sahib becomes the eternal Guru of the Sikhs. |- |1710 |12 May |Sikh army under Banda Singh Bahadur defeats Mughal Empire in the Battle of Chappar Chiri and establishes Sikh rule from Lahore to Delhi. |- |1717 | |Meitei king Pamheipa (Gharib Nawaz (Manipur)) introduces Hinduism as the state religion and changes the name of the kingdom to the Sanskrit Manipur. |- | rowspan="2" |1721 |March – October |Attingal Outbreak takes place |- |13–14 November |Madras cyclone occurs |- |1720 | |Bajirao I appointed by Shahu Maharaj as Peshwa (prime minister) who would later expand the Maratha empire to cover most of present-day India. |- |1724 | |Meitei king Gharib Nawaz of the Ningthouja dynasty invades Burma. |- |1728 |28 February |Bajirao I defeats the combined forces of the Mughal Empire and the Nizam of Hyderabad in the Battle of Palkhed |- |1729 |March |Maratha Empire under Bajirao defeats Mughal Empire, in response for an appeal for help from Chhatrasal, ruler of Bundelkhand in the Battle of Bundelkhand |- |1731 | |Maratha Empire under Bajirao defeats Mughal Empire and Maratha rebel factions in the Battle of Dabhoi |- | rowspan="2" |1737 |16 March |Marathas under Bajirao I defeat the Mughal Empire in the Battle of Delhi (1737) |- |24 December |Marathas defeat a combined army of the Mughal Empire, Nizam of Hyderabad, Nawab of Awadh and Nawabs of Bhopal in the Battle of Bhopal |- | rowspan="2" |1739 |17 February – 16 May |Marathas under Bajirao I defeat the Portuguese in the Battle of Vasai, Portuguese army and administration pulled out of Baçaim (Vasai). |- |March |Nader Shah invades India from Iran. Nader Shah captures and sacks Delhi. |- |1740 |May |Raghoji I Bhonsle of the Maratha Empire defeats and kills Dost Ali Khan the Mughal Nawab of Arcot in the Battle of Damalcherry. |- | rowspan="2" |1741 |26 March |Maratha army defeats the Nawab of Carnatic and captures Trichinopoly after the Siege of Trichinopoly (1741) |- |10 August |Kingdom of Travancore under Marthanda Varma defeats the Dutch Empire in the Battle of Colachel. |- | rowspan="2" |1753 |10 May |Jats under Suraj Mal defeat the Mughal Empire in the Capture of Delhi (1753) |- |15 August |Treaty of Mavelikkara signed between the Kingdom of Travancore and the Dutch East India Company, effectively ending the political and commercial dominance of the Dutch on the Kerala coast and beginning of the end of Dutch influence in India. |- |1754 |20 January – 18 May |Bharatpur State defeat the Marathas in Battle of Kumher. |- |1756 | |Black Hole of Calcutta infamous incident where soldiers of East India Company were held hostage in tortuous conditions, later served as a precedent for the Battle of Plassey |- | rowspan="3" |1757 |16 January |Maratha Empire defeats Durrani Empire, in the Battle of Narela. |- |23 June |British East India Company defeats the Nawab of Bengal in the Battle of Plassey, marking the End of Islamic period of 565 Years over India (1192–1757) & beginning of British conquests in India. |- |11 August |Maratha Empire defeats Rohilla Afghans in the Battle of Delhi (1757), captures Delhi. |- |1757 |12 February |Jats under Suraj Mal defeat Durrani Empire, in the Battle of Bharatpur. |- | rowspan="3" |1758 | |Third Carnatic War |- |28 April |Maratha Empire led by Raghunathrao and Mahadaji Shinde defeats Durrani Empire in the Battle of Attock (1758), captures Attock. |- |8 May |Maratha Empire led by Raghunathrao, Malhar Rao Holkar and Tukoji Rao Holkar defeats Durrani Empire in the Battle of Peshawar (1758), captures Peshawar. |- | rowspan="2" |1759 | |French India (to 1954) |- | |Maratha Empire supported by Sikh Sukerchakia Misl defeats Durrani Empire in the Battle of Lahore (1759) |- |1760 |3 January |Marathas comprehensively defeat the Nizam in the Battle of Udgir. Maratha Empire reaches its zenith. |- |1760 | |Battle at Wandewash, British troops beat French |- | rowspan="4" |1761 |January |The Marathas are routed in the Third Battle of Panipat on 14 January 1761, by the Afghans led by Ahmad Shah Durrani, also known as Ahmad Shah Abdali. The battle is considered one of the largest battles fought in the 18th century. |- |12 June |Capture of Agra Fort by the Kingdom of Bharatpur led by king Suraj Mal, defeating the armies of the Mughal Empire and Rohilla Afghans |- |August |The Sukerchakia Misl of Dal Khalsa (Sikh Empire) defeats the Durrani Empire in the Battle of Sialkot (1761) |- |September |The Sikh Confederacy defeats the Durrani Empire in the Battle of Gujranwala (1761) |- | rowspan="2" |1762 |5 February |Vadda Ghalughara, the massacre of 30,000 Sikhs, mostly non-combatants, by the army of Ahmad Shah Durrani |- |May |Sikh Misls under Jassa Singh Ahluwalia defeat the Durrani Empire in the Battle of Harnaulgarh |- | rowspan="2" |1763 |10 August |Maratha Empire led by Madhavrao I defeats the Nizam of Hyderabad in the Battle of Rakshasbhuvan and gains territory. |- |25 December |Suraj Mal dies |- | rowspan="2" |1764 |26 February |Sikh Misls under Jassa Singh Ahluwalia defeat the Durrani Empire in the Battle of Sirhind (1764) and capture Sirhind |- |22 October |Battle of Buxar (British victory against allied Mughal, Bengal and Oudh forces) |- |1765 |February |Kingdom of Bharatpur led by king Jawahar Singh defeats the Mughal Empire in the Battle of Delhi (1764) |- |1767 | |First Anglo-Mysore War begins, in which Hyder Ali of Mysore defeats the armies of the British East India Company. |- |1770 | |Great Bengal famine of 1770, estimated to have caused the deaths of about 10 million people. Warren Hastings's 1772 report estimated that a third of the population in the affected region starved to death. The famine is attributed to failed monsoon and exploitative policies of the East India Company. |- |1771 | |Marathas led by Mahadaji Shinde defeat Rohilla Afghans and re-capture Delhi and parts of North India, thus reasserting their supremacy in north India. As revenge for the losses in the Battle of Panipat, the Maratha army devastated Rohilkhand by looting and plundering and also took the members of royal family as captives. |- |1772 |22 May |Ram Mohan Roy Born (to 1833) |- | rowspan="3" |1773 | |Narayanrao Peshwa is murdered by his uncle Raghunathrao's wife in front of Raghunathrao. |- | |Regulating Act of 1773 |- | |Warren Hastings appointed as first Governor-General of Bengal |- |1774 | |Chief Justice of the Maratha Empire, Ram Shastri passes death sentence against the ruling Peshwa Raghunathrao for murdering his nephew. |- | rowspan="2" |1775 | |First Anglo-Maratha War |- |June |Alliance of Shekhawat chieftains and Kingdom of Jaipur defeat the Mughal Empire supported by Baloch chieftains in the Battle of Mandan |- |1779 | |Maratha ''sardar'' Mahadji Shinde routs the East India Company army at the Battle of Wadgaon. War ends with the restoration of status quo as per Treaty of Salbai. |- |1780 | |Second Anglo-Mysore War begins. |- |1781 | |Maratha Empire defeats forces of the British East India Company in the Battle of Bhorghat. |- | rowspan="2" |1784 | |Second Anglo-Mysore War ends with the Treaty of Mangalore. |- | |Captivity of Mangalorean Catholics at Seringapatam, suffer extreme hardships, torture, death, forcibly converted to Sunni Islam. Of the 60,000–80,000 Christians taken captive, only 15,000–20,000 survive. |- |1786 | |District collectors in Bengal were made responsible for settling the revenue and collecting it. |- |1787 | |Maratha Empire defeats Tipu Sultan, the king of Mysore in the Maratha–Mysore War, resulting in the Treaty of Gajendragad. Tipu Sultan is forced to pay 4.8 million rupees as a war cost to the Marathas, an annual tribute of 1.2 million rupees and return all the territory captured by his father Hyder Ali |- | rowspan="2" |1789 | |Third Anglo-Mysore War begins. |- | |Tipu Sultan invades Malabar (present day Kerala), destroys a number of temples including the temples of Bhagamandala, Payyavoor, Ammakoottam Mahadevi temple and Thrikkadamba Sri.mahavishnu temple. Thousands are killed, women raped and populace forced to convert to Islam, |- | rowspan="2" |1790 | |The Marathas under Holkar and General de Boigne defeat the Rajputs of Jaipur and Mughals at the Battle of Patan, where 3000+ Rajput cavalry is killed and the entire Mughal unit vanquished. The defeat crushes Rajput hope of independence from external influence |- |May |Kingdom of Travancore defeats the Kingdom of Mysore in the Battle of Nedumkotta |- |1792 | |Third Anglo-Mysore War ends. |- |1793 | |Birth of Rani Rashmoni, one of the pioneers of the Bengali Renaissance. |- | rowspan="2" |1795 |11 March |Maratha Empire defeats the Nizam of Hyderabad in the Battle of Kharda, Nizam ceded territory. |- |13 August |Death of Ahilyabai Holkar |- |1796 | |Ching-Thang Khomba moves Manipur's capital to Kangla |- |1798 | |Fourth Anglo-Mysore War begins. |- | rowspan="2" |1799 | |Fourth Anglo-Mysore War ends with the death of Tipu Sultan, the victory of the East India Company, and the restoration of their ally, the Wodeyar dynasty of Mysore. |- | |Polygar War |- |1800 |13 March |Death of Nana Fadnavis |} === 19th century === {| class="wikitable" !Year !Date !Event |- |1801 |12 April |Maharaja Ranjit Singh establishes Khalsa rule of Punjab from Lahore. Khalsa army liberates Kashmiri Pandits and invades Afghanistan via the Khyber Pass. |- |1802 | |The Kingdom of Kottayam defeats the British East India Company in the Battle of Panamarathukotta |- |1803 | |The Second Anglo-Maratha War begins. |- |1805 |17 December |The Second Anglo-Maratha War ends. |- |1806 |10 July |Vellore mutiny |- |1807 | |Hari Singh Nalwa, commander of the Sikh Khalsa Army of the Sikh Empire defeats the Durrani Empire in the Battle of Kasur, the first in a series of battles. |- |1809 |25 April |The East India Company signs the first Treaty of Amritsar with Ranjit Singh. |- |1811 |28 October |The death of Yashwantrao Holkar |- |1813 |13 July |Dewan Mokham Chand and Hari Singh Nalwa, commanders of the Sikh Khalsa Army of the Sikh Empire defeat the Durrani Empire in the Battle of Attock and capture Attock |- |1814 |15 January |"Atmiya Sabha" is established by Raja Ram Mohan Roy. |- |1817 |3 June, 20 January |The Third Anglo-Maratha War begins. Establishment of Hindu College (Presidency College, now Presidency University, Kolkata) |- | rowspan="2" |1818 |March – 2 June |Sikh Empire defeats the Durrani Empire and captures Multan after the Siege of Multan (1818). |- |31 December |The Third Anglo-Maratha War ends with the defeat of Bajirao II and the end of the Maratha Empire, leaving the East India Company with control of almost the whole of India. |- |1819 |3 July |Sikh Empire defeats the Durrani Empire in the Battle of Shopian and captures Srinagar and Kashmir. Islamic rule ends in Jammu and Kashmir. |- |1820 |31 December |Ishwar Chandra Vidyasagar is born (to 1891). |- | rowspan="2" |1823 |5 March |Anglo-Burmese Wars (to 1826) |- |14 March |Sikh Empire defeats the Emirate of Afghanistan and the Nawab of Amb to annex Peshawar Valley, in the Battle of Nowshera |- |1824 |12 February |Dayananda Saraswati is born (to 1883) |- |1825 |December 1825 – January 1826 |Battle between British East India Company and Bharatpur State |- |1826 |4 January |British rule in Burma (to 1947) |- |1827 |11 April |Jyotirao Phule is born (to 1890) |- |1828 |19 November |Rani of Jhansi Laxmi bai was born (to 1858) |- |1829 | |Kol uprising |- |1831 |6 May |Sikh Empire defeats the Mujahideen forces of Syed Ahmad Barelvi in the Battle of Balakot |- |1834 |6 May |Sikh Empire defeats the forces of Afghan Durrani Empire in the Battle of Peshawar (1834). Peshawar becomes part of the Sikh Empire. |- |1836 |18 February |Sri Ramakrishna Paramhansa is born (to 1886) |- |1837 |18 February |Hari Singh Nalwa, commander of the Sikh Khalsa Army defeats the Durrani Empire in the Battle of Jamrud and extends the frontier of Sikh Empire to beyond the Indus River right up to the mouth of the Khyber Pass. |- |1839 | |First Anglo-Afghan War |- | rowspan="2" |1845 |13 January |First Anglo-Sikh Wars (to 1849) |- |4 November |Vasudev Balwant Phadke is born (to 1883) |- |1848 |22 November |The Sikh Empire under Sher Singh Attariwalla defeats the British East India Company under Sir Hugh Gough in the Battle of Ramnagar |- |1849 |13 January |The Sikh Empire under Sher Singh Attariwalla defeats the British East India Company under Sir Hugh Gough in the Battle of Chillianwala |- |1853 |1 April |The Post Service started. |- |1853 |16 April |The first railway is established between Bombay and Thane. |- | rowspan="2" |1855 |31 May |Rani Rashmoni builds the Dakshineswar Kali Temple. |- |30 June |Santhal rebellion |- | rowspan="3" |1856 |25 July |Hindu Widows' Remarriage Act, 1856 |- |23 July |Bal Gangadhar Tilak is born (to 1920) |- |20 August |Narayana Guru is born (to 1928) |- | rowspan="2" |1857 |10 May |British victory in Indian Rebellion of 1857. Last Mughal Emperor Bahadur Shah Zafar was deposed by British East India Company and India transferred to British Crown. Marks the End of Mughal Dynasty rule over India. |- |18 July, 24 January |India's first three universities, the University of Mumbai, the University of Madras and the University of Calcutta, are established. |- | rowspan="3" |1858 |18 June 1858 |Rani of Jhansi, Rani Lakshmibai died |- |1 November |British Raj (to 1947) Marks the Beginning Of Direct British Rule Over India For 89 Years(1858–1947). |- |7 November |Bipin Chandra Pal is born (to 1932) |- |1859 |18 April |Death of Tatya Tope |- |1861 |7 May |Rabindranath Tagore is born. |- |1862 | |The high courts of Calcutta, Madras, and Bombay are established. |- |1863 |12 January |Swami Vivekanand is born (to 1902) |- |1865 |28 January |Lala Lajpat Rai is born (to 1928) |- |1867 |31 March |"Prarthana Samaj" established earlier known as "Atmiya Sabha", "Tahzeeb-ul-Akhlaq" was started |- |1869 |2 October |Mahatma Gandhi is born (to 30 January 1948) Thakkar Bapa is born (to 1951) |- |1873 |24 September |Jyotirao Phule establishes the Satyashodhak Samaj society. |- | rowspan="3" |1875 |10 April |"Arya Samaj" is established. |- | |Aligarh Muslim University |- | |Deccan Riots |- |1876 |25 December |Muhammad Ali Jinnah was born (1876–1948) |- |1877 |1 January |The first Delhi Durbar |- |1883 |30 October |Maharishi Dayanand Saraswati dies |- |1885 |28 December |The Indian National Congress is established |- |1889 |14 November |Jawaharlal Nehru is born (to 1964). |- |1889 |3 December |Khudiram Bose is born (to 1908). |- |1891 |14 April |B. R. Ambedkar is born (to 1956). |- |1891 |31 March |Anglo-Manipur War. |- |1895 |11 May |jiddu krishnamurti is born (to 17 February 1986). |- | rowspan="3" |1897 |23 January |Subhas Chandra Bose is born (to 1945); the first fingerprint bureau of India is established in Calcutta. |- |11 June |Ram Prasad Bismil is born |- |22 June |Chapekar brothers assassinate W.C.Rand. |} == Modern India == === 20th century === {| class="wikitable" !Year !Date !Event |- |1900 |3 March |Maghfoor Ahmad Ajazi is born (to 1966). |- |1902 | |Anushilan Samiti, revolutionary association formed. |- | rowspan="2" |1903 |11 December |British expedition to Tibet |- |1 January |Delhi Durbar Second Time. |- |1904 |5 November |University Act |- | rowspan="2" |1905 | |Bharat Sevak Samaj founded by Gopal Krishna Gokhale. |- |16 October |Partition of Bengal (1905) |- | rowspan="2" |1906 | |Jugantar formed. |- |30 December |Muslim League formed in Dacca. |- |1907 | |Surat Split |- |1908 | |Alipore bomb case |- |1909 | |Morley-Minto Reforms |- | rowspan="2" |1911 | |Cancellation of Partition of Bengal |- | |Delhi Durbar Third Time |- | rowspan="1" |1911 |12 December |The British government moves the capital from Calcutta to Delhi. |- |1912 | |Delhi conspiracy case |- | rowspan="2" |1913 | |Gadar Party formed. |- | |Rabindranath Tagore won Nobel Prize in Literature |- |1914 | |Hindu–German Conspiracy |- | rowspan="3" |1915 | |Ghadar conspiracy |- | |Provisional Government of India formed in Kabul. |- | |Mahatma Gandhi returns to India. |- |1916 | |Lucknow Pact |- | rowspan="2" |1917 | |Champaran Satyagraha |- | |Justice Party (India) is founded |- |1918 | |Kheda Satyagraha and Ahmedabad Mill Strike |- | rowspan="3" |1919 |13 April |Jallianwala Bagh massacre |- | |Montagu–Chelmsford Reforms |- |18 March |Rowlatt Act is passed Diarchy |- |1920 | |Non-cooperation movement Khilafat Movement |- |1922 |5 February |Chauri Chaura incident |- |1924 | |The Hindustan Socialist Republican Association is formed. |- |1925 |9 August |Kakori conspiracy |- |1925 |27 September |Rashtriya Swayamsevak Sangh (RSS) is founded. |- | rowspan="2" |1927 |20 March |Mahad Satyagraha |- |November |Simon Commission |- |1928 | |Bardoli Satyagraha |- | rowspan="2" |1929 | |Central Assembly bombed by Bhagat Singh and Batukeshwar Dutt. |- | |Purna Swaraj resolution. |- | rowspan="2" |1930 | |Salt Satyagraha, the civil disobedience movement, begins with the Dandi march. |- | |The first Round Table Conferences (India) |- | rowspan="3" |1931 |March |Gandhi–Irwin Pact |- |23 March |Bhagat Singh, Rajguru and Sukhdev martyred |- |September–December |The second Round Table Conferences (India) |- | rowspan="3" |1932 |24 September |Poona Pact |- |16 August |Communal Award |- |November–December |The third Round Table Conferences (India) |- |1935 |August |Government of India Act 1935 |- |1937 | |1937 Indian provincial elections |- |1939 | |The All India Forward Bloc established by Subhas Chandra Bose |- | rowspan="3" |1940 |23 March |Lahore Resolution |- | |The All-India Jamhur Muslim League established by Maghfoor Ahmad Ajazi to support a united India |- |8 August |August offer 1940 |- | rowspan="2" |1942 |late March |Cripps' mission |- |August |1. Quit India Movement 2. The Indian National Army is established by Subhas Chandra Bose. |- |1943 | |Arzi Hukumat-e-Azad Hind, the Provisional Government of Free India is formed by Netaji. |- |1944 | |Subhas Chandra Bose calls Mahatma Gandhi the Father of the Nation. |- | rowspan="2" |1945 |18 August |Subhas Chandra Bose death in plane crash at Taiwan. |- | |Wavell Plan, Simla Conference |- | rowspan="4" |1946 |February |Royal Indian Navy mutiny |- |March |Cabinet Mission |- |16 August |Direct Action Day/Great Calcutta Killings |- |October–November |Noakhali riots |- | rowspan="4" |1947 |July |Indian Independence Act 1947 by British Raj |- |14 August |Partition of India and Pakistan becomes an independent state |- |15 August |Indian independence from the British Raj. |- | |Hundreds of thousands die in widespread communal bloodshed after partition, continuing to 1948. |- | rowspan="3" |1948 |30 January |Mahatma Gandhi is assassinated by Nathuram Godse. |- | |War with Pakistan over disputed territory of Kashmir. |- | |Telangana and other princely states are integrated into Indian union. |- |1950 |26 January |India became a republic. |- |1951 | |Reconstruction of the Somnath temple under the orders of the Home Minister of India Vallabhbhai Patel. |- |1951 | |Congress Party wins first general elections under leadership of Jawaharlal Nehru (to 1952). |- |1955 | |Nationalisation of the Indian insurance sector. Establishment of LIC. |- | rowspan="2" |1956 |14 October |B. R. Ambedkar converted to Buddhism along with 600,000 followers. |- |6 December |B. R. Ambedkar died. States Reorganization Act in force from 1 November. |- | rowspan="2" |1962 | |War over disputed territory of Kashmir with China. |- | |India seizes Diu, Daman and Goa from Portuguese India. |- |1964 |27 May |Death of Prime Minister Jawaharlal Nehru. |- |1965 |6–23 September |Second war with Pakistan over Kashmir. |- | rowspan="2" |1966 |11 January |Prime Minister Lal Bahadur Shastri's mysterious death in Tashkent. |- |24 January |Nehru's daughter Indira Gandhi becomes prime minister. |- | rowspan="2" |1969 |19 July |Nationalisation of 14 major private Banks. |- |15 August |Indian Space Research Organisation formed under Department of Space. |- | rowspan="2" |1971 |3–16 December |Third war with Pakistan, culminating in the creation of Bangladesh |- | |Twenty-year treaty of friendship signed with Soviet Union. |- |1974 |18 May |India Smiling Buddha first nuclear device in underground test. |- | rowspan="2" |1975 |15 May |Sikkim becomes part of Indian Union after a referendum in the Sikkim Assembly. |- |25 June |Indira Gandhi declares a state of emergency after being found guilty of electoral malpractice. Nearly 1,000 political opponents imprisoned and programme of compulsory birth control introduced. (to 1977) |- |1977 | |Indira Gandhi's Congress Party loses general elections. Janata Party comes to power. The Communist Party of India (Marxist) comes into power in West Bengal. |- |1979 | |The Janata Party splits. Chaudhary Charan Singh becomes Prime Minister. |- |1980 | |Indira Gandhi returns to power heading the Congress party splinter group, Congress (Indira). |- |1983 | |N. T. Rama Rao NTR's nine-month-old Telugu Desam assumes power in AP becoming a challenger post Loknayak Jayprakash Narayan against Indira Gandhi. |- |1983 | |India won World Cup for the first time, in one day international Cricket led by Kapil Dev. |- | rowspan="3" |1984 | |Troops storm Golden Temple, the Sikhs' most holy shrine, after Jarnail Singh Bhindranwale seeks refuge inside. There are a movement to flush out Sikh separatism and calls for secularism, called Operation Blue Star. "Anti-Sikh Riots 1984". |- | |Indira Gandhi is assassinated by her Sikh bodyguards; her son, Rajiv, takes over. |- | |Many Sikhs were killed due to the assassination of Indira Gandhi. ''see 1984 anti-Sikh riots.'' |- |1987 | |India deploys troops for peacekeeping operation in Sri Lanka's ethnic conflict. |- |1988 | |SEBI was established by The Government of India on 12 April 1988 and given statutory powers in 1992 with SEBI Act 1992 being passed by the Indian Parliament. |- |1989 | |Falling public support leads to a Congress defeat in general election. |- |1989 | |The National Front (India), headed by V. P. Singh and led by Janata Dal, is formed and storms into power with outside support from BJP and CPI(M). |- |1990 | |Muslim separatist groups begin campaign of violence against Hindus in Kashmir resulting in Exodus of Kashmiri Hindus. |- | rowspan="2" |1991 | |Rajiv Gandhi is assassinated by a suicide bomber sympathetic to Sri Lanka's Tamil Tigers. |- | |An economic reform programme or Economic liberalisation in India is begun by Prime Minister P. V. Narasimha Rao. |- | rowspan="2" |1992 | |Babri Mosque in Ayodhya is demolished, triggering widespread Hindu-Muslim violence. |- | |Over 200 people die in Cuttack in Odisha, after drinking illegally brewed liquor in the 1992 Odisha liquor deaths incident. |- |1995 |July |West Bengal Chief Minister Jyoti Basu made the first call from Kolkata to inaugurate the cellular services in India. |- |1996 | |Congress suffers its worst electoral defeat ever as BJP emerges as the largest single party. |- |1996 |August |The Amarnath Yatra tragedy in which at least 194 pilgrims are reported to have frozen to death in northern Kashmir after being stranded by violent rain and snow storms. |- | rowspan="2" |1998 | |BJP forms coalition government under Prime Minister Atal Bihari Vajpayee. |- | |India and Pakistan carry out nuclear tests, leading to widespread international condemnation. |- | rowspan="3" |1999 |February |Vajpayee makes a historic bus trip to Pakistan to meet Premier Nawaz Sharif and to sign bilateral Lahore peace declaration. |- |May |Indian Army launches operations to evict Pakistani forces occupying Indian positions on the icy heights in Kargil district, known as the Kargil War. |- |October |The Cyclone devastates eastern state of Odisha, leaving at least 10,000 dead. |- | rowspan="3" |2000 |March |US President Bill Clinton makes a groundbreaking visit to improve ties. |- |May |India marks the birth of its billionth citizen. |- |November |The states of Jharkhand, Chhattisgarh and Uttarakhand were created on 15 November 2000. |} === 21st century === {| class="wikitable" !Year !Date !Event |- | rowspan="9" |2001 |26 January |The 7.7 M<sub>w</sub>  Gujarat earthquake shakes Western India with a maximum Mercalli intensity of X (''Extreme''), leaving 13,805–20,023 dead and about 166,800 injured. |- |July |Vajpayee meets Pakistani President Pervez Musharraf in the first summit between the two neighbours in more than two years. The meeting ends without a breakthrough or even a joint statement because of differences over Kashmir. |- |July |Vajpayee's BJP party declines his offer to resign over a number of political scandals and the apparent failure of his talks with Pakistani President Musharraf. |- |September |US lifts sanctions which it imposed against India and Pakistan after they staged nuclear tests in 1998. The move is seen as a reward for their support for the US-led anti-terror campaign. |- |October |India and Pakistan fire at each other's military posts in the heaviest firing along the dividing line of control in Kashmir for almost a year. |- |October |Pakistani forces shelled the village of Arnia about three km (two miles) from the border in the early hours of Monday 6 June, killing five and wounding at least two dozen civilians. |- |December |Suicide squad attacks parliament in New Delhi, killing several police. The five gunmen die in the assault. |- |December |India imposes sanctions against Pakistan, to force it to take action against two Kashmir militant groups blamed for the suicide attack on parliament. Pakistan retaliates with similar sanctions, and bans the groups in January. |- |December |India, Pakistan mass troops on common border amid mounting fears of a looming war. |- | rowspan="6" |2002 | |War of words between Indian and Pakistani leaders intensifies. Actual war seems imminent. |- |January |India successfully test-fires a nuclear-capable ballistic missile – the Agni – off its eastern coast. |- |February |Inter-religious bloodshed breaks out after 59 Hindu pilgrims returning from Ayodhya are killed in a train fire in Godhra, Gujarat. More than 1,000 people, die in subsequent riots. (Police and officials blamed the fire on a Muslim mob; a 2005 government investigation said it was an accident, though later court and SIT report held Muslim mob responsible.) |- |May |Pakistan test-fires three medium-range surface-to-surface Ghauri missiles, which are capable of carrying nuclear warheads. |- |June |UK, US urge their citizens to leave India and Pakistan, while maintaining diplomatic offensive to avert war. |- |July |Retired scientist and architect of India's missile programme A. P. J. Abdul Kalam is elected president. |- | rowspan="3" |2003 |August |At least 50 people are killed in two simultaneous bomb blasts in Bombay. |- |November |India matches Pakistan's declaration of a Kashmir ceasefire. |- |December |India, Pakistan agree to resume direct air links and to allow overflights. |- | rowspan="5" |2004 |January |Groundbreaking meeting is held between government and moderate Kashmir separatists. |- |May |Surprise victory for Congress Party in general elections. Manmohan Singh is sworn in as prime minister. |- |September |India, along with Brazil, Germany and Japan, launches an application for a permanent seat on the UN Security Council. |- |November |India begins to withdraw some of its troops from Kashmir. |- |December |Thousands are killed when tsunami, caused by the 2004 Indian Ocean earthquake off the Indonesian coast, devastate coastal communities in the south and in the Andaman and Nicobar Islands. |- | rowspan="2" |2005 |July |More than 1,000 people are killed in floods and landslides caused by monsoon rains in Mumbai (Bombay) and Maharashtra region. |- |8 October |The 7.6 M<sub>w</sub>  Kashmir earthquake strikes with a maximum Mercalli intensity of VIII (''Severe''), leaving 86,000–87,351 people dead, 69,000–75,266 injured, and 2.8 million homeless. |- | rowspan="2" |2006 |February |India's largest-ever rural jobs scheme is launched, aimed at lifting around 60 million families out of poverty. |- |March |US and India sign a nuclear agreement during a visit by US President George W. Bush. The US gives India access to civilian nuclear technology while India agrees to greater scrutiny for its nuclear programme. |- | rowspan="8" |2007 |February |India and Pakistan sign an agreement aimed at reducing the risk of accidental nuclear war. |- |18 February |68 passengers, most of them Pakistanis, are killed by bomb blasts and a blaze on a train travelling from New Delhi to the Pakistani city of Lahore. |- |March |Maoist rebels in Chhattisgarh state kill more than 50 policemen in a dawn attack. |- |April |India's first commercial space rocket is launched, carrying an Indian satellite. |- |May |Government announces its strongest economic growth figures for 20 years – 9.4% in the year to March. |- |May |At least nine people are killed in a bomb explosion at the main mosque in Hyderabad. Several others are killed in subsequent rioting. |- |July |India says the number of its people with HIV or AIDS is about half of earlier official tallies. Health ministry figures put the total at between 2 million and 3.1 million cases, compared with previous estimates of more than 5 million. |- |25 July |Pratibha Patil becomes first woman to be elected president of India |- | rowspan="5" |2008 |July |Series of explosions kills 49 in Ahmedabad, in Gujarat state. The little-known terrorist group Indian Mujahideen claims responsibility. |- |October |Following approval by the US Congress, President George W. Bush signs into law a nuclear deal with India, which ends a three-decade ban on US nuclear trade with Delhi. |- |October |India successfully launches its first mission to the moon, the uncrewed lunar probe Chandrayaan-1. |- |November |The 2008 Mumbai attacks (often called the 26/11 attacks) kill 174 people, including 9 of the 10 terrorists from Lashkar-e-Taiba, an Islamic terrorist organisation based in Pakistan. India decides not to attack Pakistan in retaliation. |- |December |India announces "pause" in peace process with Pakistan. Indian cricket team cancels planned tour of Pakistan. |- | rowspan="3" |2009 |February |India and Russia sign deals worth $700 million, according to which Moscow will supply Uranium to Delhi. |- |May |Resounding general election victory gives governing Congress-led alliance of PM Manmohan Singh an enhanced position in parliament, only 11 seats short of an absolute majority. |- |July |Delhi court decriminalizes gay sex |- | rowspan="1" |2010 |13 February |16 people are killed in a bomb explosion at German Bakery in the city of Pune, Maharashtra. |- | rowspan="2" |2011 |2 April |India wins cricket world cup after 28 years under the captaincy of Mahendra Singh Dhoni. |- |13 May |After 34 years of Left Front Government, Trinamool Congress and Congress alliance come to power in West Bengal. |- | rowspan="1" |2012 |25 July |Pranab Mukherjee, the former Finance Minister is elected as the 13th president of India. |- | rowspan="3" |2013 |12 February |Indian helicopter bribery scandal comes to light. |- |21 February |Terror attacks in Hyderabad in Dilsukhnagar area. |- |5 November |Mars Orbiter Mission, is successfully launched into Mars orbit by the Indian Space Research Organisation (ISRO). |- | rowspan="2" |2014 |16 May |Narendra Modi elected as prime minister of India, Congress was routed in the general elections. |- |2 June |Telangana, The state of Telangana was officially formed on 2 June 2014. |- | rowspan="5" |2016 |2–5 January |Terror Attacks on Pathankot Air Base. |- |27 June |India becomes a member of Missile Technology Control Regime. |- |27 September |India launches its first space laboratory Astrosat in its biggest project since its Mars orbiter mission in 2014. |- |23 September |India signs a billion-dollar defence deal with France to buy 36 Rafale fighter jets. |- |8 November |In a surprise announcement, the government withdraws high denomination notes from circulation causing chaotic scenes at banks across the country as customers try to exchange old notes. |- | rowspan="1" |2017 |30 June |The Goods and Services Tax (GST) launched, the biggest tax reform in history of India. |- | rowspan="6" |2019 |14 February |A convoy of vehicles carrying Central Reserve Police Force (CRPF) personnel on the Jammu–Srinagar National Highway was attacked by a vehicle-borne suicide bomber in the Pulwama district, Jammu and Kashmir, India. |- |26 February |The 2019 Balakot airstrike was conducted by India, when Indian warplanes crossed the de facto border in the disputed region of Kashmir, and dropped bombs in the vicinity of the town of Balakot in Khyber Pakhtunkhwa province in Pakistan. |- |27 February |The 2019 Balakot strike from Indian side was given a reply named "Swift Retort". After a dog fight between Pakistani and Indian Fighter Pilots. Indian Wing Commander Abhinandan Varthaman was captured by the Pakistani side. However acting to the pressure of various global leaders and bound by the Vienna Convention. Pakistan was Forced to release the Indian Pilot with all due respect. |- |22 May |Narendra Modi gets re-elected as the Prime Minister of India. |- |5 August |The state of Jammu and Kashmir divided into two separate union territories known as Jammu Kashmir and Ladakh by scrapping of Article 370 of the Constitution of India. |- |11 December |The Citizenship (Amendment) Act, 2019 was passed by the Parliament of India on 11 December 2019. It amended the Citizenship Act of 1955 by providing a path to Indian citizenship for members of Hindu, Sikh, Buddhiist, Jain, Parsi, and Christian religious minorities, who had fled persecution from Pakistan, Bangladesh and Afghanistan before December 2014. |- |2020 |30 January |The first COVID-19 case of the country was reported in Kerala's Thrissur district. |- |2021 |12 May |COVID-19 pandemic in India: The country's death toll exceeds 250,000. Delhi cremation grounds were running out of places while hundreds of bodies were reported washed up on the banks of the Ganges. |- | rowspan="2" |2022 |18 July |Droupadi Murmu is elected as President of India, making her the first tribal woman and youngest person to the office. |- |30 October |The collapse of a suspension bridge in Gujarat, leaves at least 135 dead. |- | rowspan="5" |2023 |2 June |A train collision in Odisha results in at least 296 deaths and more than 1,200 others injured. |- |3 July |Indian oil refiners start payments for Russian oil imports in Chinese yuan as an alternative to the US dollar due to increasing sanctions against Russia. |- |23 August |Chandrayaan-3 becomes the first spacecraft to land near the south pole of the Moon, carrying a lunar lander named Vikram and a lunar rover named Pragyan. |- |2 September |The Indian Space Research Organisation (ISRO) successfully launches Aditya-L1, India's first solar observation mission. |- |19 November |Australia defeats India and wins the 2023 Cricket World Cup. |} 204d8885be42401a8fccb5863531feba82243f27 Indus Valley Civilisation 0 24 30 2024-03-15T15:00:30Z 80.5.18.102 0 Created page with "The '''Indus Valley Civilisation''' ('''IVC'''), also known as the '''Indus Civilisation''', was a Bronze Age civilisation in the northwestern regions of South Asia, lasting from 3300 BCE to 1300 BCE, and in its mature form 2600 BCE to 1900 BCE. Together with ancient Egypt and Mesopotamia, it was one of three early civilisations of the Near East and South Asia, and of the three, the most widespread, its sites spanning an area from much of Pakistan, to northeast Afghanist..." wikitext text/x-wiki The '''Indus Valley Civilisation''' ('''IVC'''), also known as the '''Indus Civilisation''', was a Bronze Age civilisation in the northwestern regions of South Asia, lasting from 3300 BCE to 1300 BCE, and in its mature form 2600 BCE to 1900 BCE. Together with ancient Egypt and Mesopotamia, it was one of three early civilisations of the Near East and South Asia, and of the three, the most widespread, its sites spanning an area from much of Pakistan, to northeast Afghanistan, and northwestern India. The civilisation flourished both in the alluvial plain of the Indus River, which flows through the length of Pakistan, and along a system of perennial monsoon-fed rivers that once coursed in the vicinity of the Ghaggar-Hakra, a seasonal river in northwest India and eastern Pakistan. The term ''Harappan'' is sometimes applied to the Indus civilisation after its type site Harappa, the first to be excavated early in the 20th century in what was then the Punjab province of British India and is now Punjab, Pakistan. The discovery of Harappa and soon afterwards Mohenjo-daro was the culmination of work that had begun after the founding of the Archaeological Survey of India in the British Raj in 1861. There were earlier and later cultures called Early Harappan and Late Harappan in the same area. The early Harappan cultures were populated from Neolithic cultures, the earliest and best-known of which is named after Mehrgarh, in Balochistan, Pakistan. Harappan civilisation is sometimes called ''Mature Harappan'' to distinguish it from the earlier cultures. The cities of the ancient Indus were noted for their urban planning, baked brick houses, elaborate drainage systems, water supply systems, clusters of large non-residential buildings, and techniques of handicraft and metallurgy. Mohenjo-daro and Harappa very likely grew to contain between 30,000 and 60,000 individuals, and the civilisation may have contained between one and five million individuals during its florescence. A gradual drying of the region during the 3rd millennium BCE may have been the initial stimulus for its urbanisation. Eventually it also reduced the water supply enough to cause the civilisation's demise and to disperse its population to the east. Although over a thousand Mature Harappan sites have been reported and nearly a hundred excavated, there are five major urban centres: Mohenjo-daro in the lower Indus Valley (declared a UNESCO World Heritage Site in 1980 as "''Archaeological Ruins at Moenjodaro''"), Harappa in the western Punjab region, Ganeriwala in the Cholistan Desert, Dholavira in western Gujarat (declared a UNESCO World Heritage Site in 2021 as "''Dholavira: A Harappan City''"), and Rakhigarhi in Haryana. The Harappan language is not directly attested, and its affiliations are uncertain, as the Indus script has remained undeciphered. A relationship with the Dravidian or Elamo-Dravidian language family is favoured by a section of scholars. == Etymology == The Indus civilisation is named after the Indus river system in whose alluvial plains the early sites of the civilisation were identified and excavated. Following a tradition in archaeology, the civilisation is sometimes referred to as the ''Harappan,'' after its type site, Harappa, the first site to be excavated in the 1920s; this is notably true of usage employed by the Archaeological Survey of India after India's independence in 1947. The term "Ghaggar-Hakra" figures prominently in modern labels applied to the Indus civilisation on account of a good number of sites having been found along the Ghaggar-Hakra River in northwest India and eastern Pakistan. The terms "Indus-Sarasvati Civilisation" and "Sindhu-Saraswati Civilisation" have also been employed in the literature after a posited identification of the Ghaggar-Hakra with the river Sarasvati described in the early chapters of ''Rigveda'', a collection of hymns in archaic Sanskrit composed in the second-millennium BCE. Recent geophysical research suggests that unlike the Sarasvati, described in the ''Rigveda'' as a snow-fed river, the Ghaggar-Hakra was a system of perennial monsoon-fed rivers, which became seasonal around the time that the civilisation diminished, approximately 4,000 years ago. == Pre-Harappan era: Mehrgarh == Mehrgarh is a Neolithic (7000 BCE to <abbr>c.</abbr> 2500 BCE) mountain site in the Balochistan province of Pakistan, which gave new insights on the emergence of the Indus Valley Civilisation. Mehrgarh is one of the earliest sites with evidence of farming and herding in South Asia. Mehrgarh was influenced by the Near Eastern Neolithic, with similarities between "domesticated wheat varieties, early phases of farming, pottery, other archaeological artefacts, some domesticated plants and herd animals." Jean-Francois Jarrige argues for an independent origin of Mehrgarh. Jarrige notes "the assumption that farming economy was introduced full-fledged from Near-East to South Asia," and the similarities between Neolithic sites from eastern Mesopotamia and the western Indus valley, which are evidence of a "cultural continuum" between those sites. But given the originality of Mehrgarh, Jarrige concludes that Mehrgarh has an earlier local background, and is not a "'backwater' of the Neolithic culture of the Near East". Lukacs and Hemphill suggest an initial local development of Mehrgarh, with a continuity in cultural development but a change in population. According to Lukacs and Hemphill, while there is a strong continuity between the neolithic and chalcolithic (Copper Age) cultures of Mehrgarh, dental evidence shows that the chalcolithic population did not descend from the neolithic population of Mehrgarh, which "suggests moderate levels of gene flow." Mascarenhas et al. (2015) note that "new, possibly West Asian, body types are reported from the graves of Mehrgarh beginning in the Togau phase (3800 BCE)." Gallego Romero et al. (2011) state that their research on lactose tolerance in India suggests that "the west Eurasian genetic contribution identified by Reich et al. (2009) principally reflects gene flow from Iran and the Middle East." They further note that "[t]he earliest evidence of cattle herding in south Asia comes from the Indus River Valley site of Mehrgarh and is dated to 7,000 YBP." == Early Harappan == The Early Harappan Ravi Phase, named after the nearby Ravi River, lasted from <abbr>c.</abbr> 3300 BCE until 2800 BCE. It started when farmers from the mountains gradually moved between their mountain homes and the lowland river valleys, and is related to the Hakra Phase, identified in the Ghaggar-Hakra River Valley to the west, and predates the Kot Diji Phase (2800–2600 BCE, Harappan 2), named after a site in northern Sindh, Pakistan, near Mohenjo-daro. The earliest examples of the Indus script date to the 3rd millennium BCE. The mature phase of earlier village cultures is represented by Rehman Dheri and Amri in Pakistan. Kot Diji represents the phase leading up to Mature Harappan, with the citadel representing centralised authority and an increasingly urban quality of life. Another town of this stage was found at Kalibangan in India on the Hakra River. == Mature Harappan == According to Giosan et al. (2012), the slow southward migration of the monsoons across Asia initially allowed the Indus Valley villages to develop by taming the floods of the Indus and its tributaries. Flood-supported farming led to large agricultural surpluses, which in turn supported the development of cities. The IVC residents did not develop irrigation capabilities, relying mainly on the seasonal monsoons leading to summer floods. Brooke further notes that the development of advanced cities coincides with a reduction in rainfall, which may have triggered a reorganisation into larger urban centres. According to J.G. Shaffer and D.A. Lichtenstein, the Mature Harappan civilisation was "a fusion of the Bagor, Hakra, and Kot Diji traditions or 'ethnic groups' in the Ghaggar-Hakra valley on the borders of India and Pakistan". Also, according to a more recent summary by Maisels (2003), "The Harappan oecumene formed from a Kot Dijian/Amri-Nal synthesis". He also says that, in the development of complexity, the site of Mohenjo-daro has priority, along with the Hakra-Ghaggar cluster of sites, "where Hakra wares actually precede the Kot Diji related material". He sees these areas as "catalytic in producing the fusion from Hakra, Kot Dijian and Amri-Nal cultural elements that resulted in the gestalt we recognize as Early Harappan (Early Indus)." By 2600 BCE, the Early Harappan communities turned into large urban centres. Such urban centres include Harappa, Ganeriwala, Mohenjo-daro in modern-day Pakistan, and Dholavira, Kalibangan, Rakhigarhi, Rupar, and Lothal in modern-day India. In total, more than 1,000 settlements have been found, mainly in the general region of the Indus and Ghaggar-Hakra Rivers and their tributaries. === Cities === A sophisticated and technologically advanced urban culture is evident in the Indus Valley Civilisation, making them the first urban centre in the region. The quality of municipal town planning suggests the knowledge of urban planning and efficient municipal governments which placed a high priority on hygiene, or, alternatively, accessibility to the means of religious ritual. As seen in Harappa, Mohenjo-daro and the recently partially excavated Rakhigarhi, this urban plan included the world's first known urban sanitation systems. Within the city, individual homes or groups of homes obtained water from wells. From a room that appears to have been set aside for bathing, waste water was directed to covered drains, which lined the major streets. Houses opened only to inner courtyards and smaller lanes. The housebuilding in some villages in the region still resembles in some respects the housebuilding of the Harappans. The ancient Indus systems of sewerage and drainage that were developed and used in cities throughout the Indus region were far more advanced than any found in contemporary urban sites in the Middle East and even more efficient than those in many areas of Pakistan and India today. The advanced architecture of the Harappans is shown by their dockyards, granaries, warehouses, brick platforms, and protective walls. The massive walls of Indus cities most likely protected the Harappans from floods and may have dissuaded military conflicts. The purpose of the citadel remains debated. In sharp contrast to this civilisation's contemporaries, Mesopotamia and ancient Egypt, no large monumental structures were built. There is no conclusive evidence of palaces or temples. Some structures are thought to have been granaries. Found at one city is an enormous well-built bath (the "Great Bath"), which may have been a public bath. Although the citadels were walled, it is far from clear that these structures were defensive. Most city dwellers appear to have been traders or artisans, who lived with others pursuing the same occupation in well-defined neighbourhoods. Materials from distant regions were used in the cities for constructing seals, beads and other objects. Among the artefacts discovered were beautiful glazed faïence beads. Steatite seals have images of animals, people (perhaps gods), and other types of inscriptions, including the yet un-deciphered writing system of the Indus Valley Civilisation. Some of the seals were used to stamp clay on trade goods. Although some houses were larger than others, Indus civilisation cities were remarkable for their apparent, if relative, egalitarianism. All the houses had access to water and drainage facilities. This gives the impression of a society with relatively low wealth concentration. === Authority and governance === Archaeological records provide no immediate answers for a centre of power or for depictions of people in power in Harappan society. But, there are indications of complex decisions being taken and implemented. For instance, the majority of the cities were constructed in a highly uniform and well-planned grid pattern, suggesting they were planned by a central authority; extraordinary uniformity of Harappan artefacts as evident in pottery, seals, weights and bricks; presence of public facilities and monumental architecture; heterogeneity in the mortuary symbolism and in grave goods (items included in burials). These are some major theories:There was a single state, given the similarity in artefacts, the evidence for planned settlements, the standardised ratio of brick size, and the establishment of settlements near sources of raw material. * There was no single ruler but several cities like Mohenjo-daro had a separate ruler, Harappa another, and so forth. === Metallurgy === Harappans evolved some new techniques in metallurgy and produced copper, bronze, lead, and tin. A touchstone bearing gold streaks was found in Banawali, which was probably used for testing the purity of gold (such a technique is still used in some parts of India). == Late Harappan == Around 1900 BCE signs of a gradual decline began to emerge, and by around 1700 BCE most of the cities had been abandoned. Recent examination of human skeletons from the site of Harappa has demonstrated that the end of the Indus civilisation saw an increase in inter-personal violence and in infectious diseases like leprosy and tuberculosis. According to historian Upinder Singh, "the general picture presented by the late Harappan phase is one of a breakdown of urban networks and an expansion of rural ones." During the period of approximately 1900 to 1700 BCE, multiple regional cultures emerged within the area of the Indus civilisation. The Cemetery H culture was in Punjab, Haryana, and Western Uttar Pradesh, the Jhukar culture was in Sindh, and the Rangpur culture (characterised by Lustrous Red Ware pottery) was in Gujarat. Other sites associated with the Late phase of the Harappan culture are Pirak in Balochistan, Pakistan, and Daimabad in Maharashtra, India. The largest Late Harappan sites are Kudwala in Cholistan in Punjab, Bet Dwarka in Gujarat, and Daimabad in Maharashtra, which can be considered as urban, but they are smaller and few in number compared with the Mature Harappan cities. Bet Dwarka was fortified and continued to have contacts with the Persian Gulf region, but there was a general decrease of long-distance trade. On the other hand, the period also saw a diversification of the agricultural base, with a diversity of crops and the advent of double-cropping, as well as a shift of rural settlement towards the east and the south. The pottery of the Late Harappan period is described as "showing some continuity with mature Harappan pottery traditions", but also distinctive differences. Many sites continued to be occupied for some centuries, although their urban features declined and disappeared. Formerly typical artifacts such as stone weights and female figurines became rare. There are some circular stamp seals with geometric designs, but lacking the Indus script which characterised the mature phase of the civilisation. Script is rare and confined to potsherd inscriptions. There was also a decline in long-distance trade, although the local cultures show new innovations in faience and glass making, and carving of stone beads. Urban amenities such as drains and the public bath were no longer maintained, and newer buildings were "poorly constructed". Stone sculptures were deliberately vandalised, valuables were sometimes concealed in hoards, suggesting unrest, and the corpses of animals and even humans were left unburied in the streets and in abandoned buildings. During the later half of the 2nd millennium BCE, most of the post-urban Late Harappan settlements were abandoned altogether. Subsequent material culture was typically characterised by temporary occupation, "the campsites of a population which was nomadic and mainly pastoralist" and which used "crude handmade pottery". However, there is greater continuity and overlap between Late Harappan and subsequent cultural phases at sites in Punjab, Haryana, and western Uttar Pradesh, primarily small rural settlements. === Aryan migration === In 1953 Sir Mortimer Wheeler proposed that the invasion of an Indo-European tribe from Central Asia, the "Aryans", caused the decline of the Indus civilisation. As evidence, he cited a group of 37 skeletons found in various parts of Mohenjo-daro, and passages in the Vedas referring to battles and forts. However, scholars soon started to reject Wheeler's theory, since the skeletons belonged to a period after the city's abandonment and none were found near the citadel. Subsequent examinations of the skeletons by Kenneth Kennedy in 1994 showed that the marks on the skulls were caused by erosion, and not by violence. In the Cemetery H culture (the late Harappan phase in the Punjab region), some of the designs painted on the funerary urns have been interpreted through the lens of Vedic literature: for instance, peacocks with hollow bodies and a small human form inside, which has been interpreted as the souls of the dead, and a hound that can be seen as the hound of Yama, the god of death. This may indicate the introduction of new religious beliefs during this period, but the archaeological evidence does not support the hypothesis that the Cemetery H people were the destroyers of the Harappan cities. 6072d58bbfaa1dbeae36585b14f5e98f150ceb09 Aryavartpedia 0 25 31 2024-03-15T15:19:21Z Motzoid India 2 Created page with "Aryavartpedia is an Indian encyclopedia founded by Motzoid India and hosted by Miraheze. It was formed on 19 February 2024." wikitext text/x-wiki Aryavartpedia is an Indian encyclopedia founded by Motzoid India and hosted by Miraheze. It was formed on 19 February 2024. bb915a8e672b347839f67f2f49a9ab4820d8eb55 Criminal Investigations Department 0 26 32 2024-03-15T15:25:45Z Motzoid India 2 Created page with "''This is an Article for the Police force in Various countries, For Indian T.V please see [[CID (Indian TV series)]]'' The '''Criminal Investigation Department''' ('''CID''') is the branch of a police force to which most plainclothes detectives belong in the United Kingdom and many Commonwealth nations. A force's CID is distinct from its Special Branch (though officers of both are entitled to the rank prefix "Detective"). The name derives from the CID of the Metropolita..." wikitext text/x-wiki ''This is an Article for the Police force in Various countries, For Indian T.V please see [[CID (Indian TV series)]]'' The '''Criminal Investigation Department''' ('''CID''') is the branch of a police force to which most plainclothes detectives belong in the United Kingdom and many Commonwealth nations. A force's CID is distinct from its Special Branch (though officers of both are entitled to the rank prefix "Detective"). The name derives from the CID of the Metropolitan Police, formed on 8 April 1878 by C. E. Howard Vincent as a re-formation of its Detective Branch. British colonial police forces all over the world adopted the terminology developed in the UK in the 19th and early 20th centuries, and later the police forces of those countries often retained it after independence. English-language media often use "CID" as a translation to refer to comparable organisations in other countries. == By country == === Afghanistan === The ''Criminal Investigation Department'' is under the Afghan National Police. === France === Further information: Judicial police (France) The Direction Centrale de la Police Judiciaire (DCPJ) is the national authority of the criminal division of the French National Police. Its function is to lead and co-ordinate the action of the law enforcement forces against crime. === Germany, Austria and Switzerland === ''Kriminalpolizei'' is the standard term for the criminal investigation agency within the police forces of Germany, Austria, and the German-speaking cantons of Switzerland. === Hong Kong === The Hong Kong Police Force's CID is a sub-branch unit within the Criminal Intelligence Bureau under the crime wing of the ''B'' department (crime and security). === India === "Crime Branch" redirects here. For the 1989 Malayalam film, see Crime Branch (film). Many state police forces in India possess a CID (sometimes known as the ''investigation branch'') as a specialised wing. Personnel attached to this wing work in plain clothes, or ''mufti''. A CID may contain sub-branches, for instance the CID in Uttar Pradesh includes the state crime investigation bureau, finger print bureau and scientific section. Like their counterparts in the law and order police, the crime branch has its own ranks up to the level of additional director general of police or special commissioner of police. The crime branch has senior officers like superintendents, inspectors and sub-inspectors. Officers and men attached to this wing generally add the prefix ''detective'' before their regular police rank. While the name "CID" is used in several states, some states use different names for their CID units. In Andhra Pradesh, Chhattisgarh, and , the CID is known as the Crime Investigation Department. In Assam, Bihar, Haryana, Uttar Pradesh, Rajastan, West Bengal, Maharashtra, Karnataka and Jammu and Kashmir, it is known as the Criminal Investigation Department. In Delhi and Kerala, the CID is referred to as the Crime Branch, and in Tamilnadu, it is known as the Crime Branch - Criminal Investigation Department (CB-CID). The crime branch's tasks are to investigate criminal cases, which span across multiple districts or states. The CID may also take up complicated cases like communal riot cases, circulation of counterfeit currency or very complicated murder cases. A crime branch investigation is ordered either by a judicial court, by the director-general of police, or the government. Crime branch officers can be transferred to the law and order police, and vice versa. The crime branch is different from the crime detachment or crime squad. Crime Detachment and Crime Squads are a group of regular law and order policemen (who generally wear the uniform specifically detailed by the police inspector to work in plain clothes to keep a tab on local criminal elements, prostitutes, petty thieves, and other habitual offenders. === Indonesia === Indonesian Police investigators from the criminal investigation unit The criminal investigation units within the Indonesian National Police are called ''sat-reskrim'' (''satuan reserse kriminal'') meaning "criminal investigation unit", it is under the ''bareskrim'' (''badan reserse kriminal'') "criminal investigation agency" which is under the command of the national police headquarters. Every regional police force in Indonesia has this unit; they are concerned with conducting criminal investigations and identification activities. === Ireland === The Royal Irish Constabulary (RIC) maintained a CID along British lines before the independence of most of Ireland in December 1922. After the Partition of Ireland and the establishment of the Irish Free State in the early 1920s, the Government of the Irish Free State set up a CID for the purposes of counter-insurgency during the 1922-1923 Irish Civil War. It was separate from the unarmed Civic Guard, which later became the Garda Síochána. The Garda today operates local detective squads and several specialised, national detective units, including the National Bureau of Criminal Investigation. In Northern Ireland, a region that came into existence in 1921 and which has remained within the United Kingdom, a new police force was formed in June 1922 called the Royal Ulster Constabulary (RUC). This force had its own CID from the start. In November 2001, the RUC was replaced by the Police Service of Northern Ireland (PSNI). === Japan === Criminal investigation departments or bureaus are set up within each Prefectural police headquarters. They maintain two investigation divisions (捜査課, ''sousa-ka'') (third or even fourth divisions are established in some urban prefecture), a organised crime investigation division (組織犯罪対策課, ''soshikihanzai-taisaku-ka'') (reinforced as an independent department or headquarters in the TMPD and some prefecture), a mobile investigation unit, and a identification division (鑑識課, ''kanshiki-ka''). The mobile investigation units (機動捜査隊, ''kidō sousa-tai'') are first responders for initial criminal investigations, distributed among the region with unmarked cars. The special investigation teams (特殊事件捜査係, ''tokushu-jiken sousa-kakari'') are specialised detective units of the first investigation divisions, well acquainted with new technologies and special tactics including SWAT capabilities. === Kenya === === Malaysian === The CID of the Royal Malaysian Police is involved with the investigation, arrest, and prosecution of crimes that affect people (e.g. murder, robbery with firearms, rape and injury) and property crime (e.g. theft and house-breaking). Modeled on the British police, this department enforces laws regarding gambling, "sin" and the Triad in Malaysia. === Pakistan === The CID in Pakistan is a special unit of the provincial and metropolitan police departments, responsible for carrying out investigations into crimes, including terrorism, murders, organised crime and sectarianism. The special branch of the CID in the Asia Division (CIDA) was a division of this department but is currently not operational. It had only 12 members, the names of which are not available because of security issues. === Singapore === The Singapore Police Force's CID is the agency for premier investigation and staff authority for criminal investigation matters within the Singapore Police Force. === Sri Lanka === The CID of the Sri Lanka Police Service is responsible for carrying out investigations into crimes including murder and organised crime. It was established in 1870. === United Kingdom === Detectives are usually either assigned to a CID unit within a local policing command, or to a central specialised unit dealing with a specific type of crime, such as fraud or sexual offences. Most local police stations have more uniformed officers than CID officers; a smaller station might have five DCs with a Detective Sergeant (DS) in command, while a larger station would have more CID officers under a detective of higher rank. A particular case would be assigned to a Senior Investigating Officer (SIO) whose rank would depend on the seriousness of the crime and their force's policy. Detectives in the United Kingdom do not have a separate rank system and are not senior to uniformed officers who hold the same rank, however, a senior detective does outrank a uniformed officer of a lower rank. for example a Detective Inspector outranks a uniformed Sergeant. Before 1999, female detectives' ranks were prefixed with "Woman", as in other branches of the police. The head of the CID in most police forces is a Detective Chief Superintendent. Ranks are abbreviated as follows: * Detective Constable (DC or Det Con) * Detective Sergeant (DS or Det Sgt) * Detective Inspector (DI or Det Insp) * Detective Chief Inspector (DCI or Det Ch Insp) * Detective Superintendent (DSU or Det Supt) * Detective Chief Superintendent (DCS or Det Ch Supt) To join a CID in the United Kingdom, a police officer usually must have served in uniform for at least two years. From 2017 direct entry to the detective branch became possible. While training as a detective they are referred to as a ''Trainee Detective Constable'' (TDC) and after completing the national Initial Crime Investigators' Development Programme, typically taking around two years, they become full Detective Constables (DCs). There is generally no pay increment on obtaining detective status in most forces. Previously paid allowances such as the detective duty allowance (a small payment intended to allow officers to purchase refreshments and other similar petty cash purposes) and the plainclothes allowance (an allowance used to purchase suitable clothing) have all been withdrawn over the past few years.<sup>[''citation needed'']</sup> ==== Military investigations[edit] ==== The Royal Military Police (RMP), Royal Navy Police (RNP), and RAF Police all maintain a Special Investigation Branch (SIB), fulfilling much the same role as a civilian CID. The Ministry of Defence Police is a civilian force that provides policing services on military bases, and as such has a CID much like a territorial police force. The RMP SIB has regular sections and one Army Reserve section. To join the reserve section, a reservist must either have a regular army SIB or civilian CID background. == See also == ee3e55238dad5ceb70a0a32c36b29b46525dc06c 40 32 2024-03-16T10:35:43Z Motzoid India 2 /* India */ wikitext text/x-wiki ''This is an Article for the Police force in Various countries, For Indian T.V please see [[CID (Indian TV series)]]'' The '''Criminal Investigation Department''' ('''CID''') is the branch of a police force to which most plainclothes detectives belong in the United Kingdom and many Commonwealth nations. A force's CID is distinct from its Special Branch (though officers of both are entitled to the rank prefix "Detective"). The name derives from the CID of the Metropolitan Police, formed on 8 April 1878 by C. E. Howard Vincent as a re-formation of its Detective Branch. British colonial police forces all over the world adopted the terminology developed in the UK in the 19th and early 20th centuries, and later the police forces of those countries often retained it after independence. English-language media often use "CID" as a translation to refer to comparable organisations in other countries. == By country == === Afghanistan === The ''Criminal Investigation Department'' is under the Afghan National Police. === France === Further information: Judicial police (France) The Direction Centrale de la Police Judiciaire (DCPJ) is the national authority of the criminal division of the French National Police. Its function is to lead and co-ordinate the action of the law enforcement forces against crime. === Germany, Austria and Switzerland === ''Kriminalpolizei'' is the standard term for the criminal investigation agency within the police forces of Germany, Austria, and the German-speaking cantons of Switzerland. === Hong Kong === The Hong Kong Police Force's CID is a sub-branch unit within the Criminal Intelligence Bureau under the crime wing of the ''B'' department (crime and security). === India === "Crime Branch" redirects here. For the 1989 Malayalam film, see [[Crime Branch (film).]] Many state police forces in India possess a CID (sometimes known as the ''investigation branch'') as a specialised wing. Personnel attached to this wing work in plain clothes, or ''mufti''. A CID may contain sub-branches, for instance the CID in Uttar Pradesh includes the state crime investigation bureau, finger print bureau and scientific section. Like their counterparts in the law and order police, the crime branch has its own ranks up to the level of additional director general of police or special commissioner of police. The crime branch has senior officers like superintendents, inspectors and sub-inspectors. Officers and men attached to this wing generally add the prefix ''detective'' before their regular police rank. While the name "CID" is used in several states, some states use different names for their CID units. In Andhra Pradesh, Chhattisgarh, and , the CID is known as the Crime Investigation Department. In Assam, Bihar, Haryana, Uttar Pradesh, Rajastan, West Bengal, Maharashtra, Karnataka and Jammu and Kashmir, it is known as the Criminal Investigation Department. In Delhi and Kerala, the CID is referred to as the Crime Branch, and in Tamilnadu, it is known as the Crime Branch - Criminal Investigation Department (CB-CID). The crime branch's tasks are to investigate criminal cases, which span across multiple districts or states. The CID may also take up complicated cases like communal riot cases, circulation of counterfeit currency or very complicated murder cases. A crime branch investigation is ordered either by a judicial court, by the director-general of police, or the government. Crime branch officers can be transferred to the law and order police, and vice versa. The crime branch is different from the crime detachment or crime squad. Crime Detachment and Crime Squads are a group of regular law and order policemen (who generally wear the uniform specifically detailed by the police inspector to work in plain clothes to keep a tab on local criminal elements, prostitutes, petty thieves, and other habitual offenders. === Indonesia === Indonesian Police investigators from the criminal investigation unit The criminal investigation units within the Indonesian National Police are called ''sat-reskrim'' (''satuan reserse kriminal'') meaning "criminal investigation unit", it is under the ''bareskrim'' (''badan reserse kriminal'') "criminal investigation agency" which is under the command of the national police headquarters. Every regional police force in Indonesia has this unit; they are concerned with conducting criminal investigations and identification activities. === Ireland === The Royal Irish Constabulary (RIC) maintained a CID along British lines before the independence of most of Ireland in December 1922. After the Partition of Ireland and the establishment of the Irish Free State in the early 1920s, the Government of the Irish Free State set up a CID for the purposes of counter-insurgency during the 1922-1923 Irish Civil War. It was separate from the unarmed Civic Guard, which later became the Garda Síochána. The Garda today operates local detective squads and several specialised, national detective units, including the National Bureau of Criminal Investigation. In Northern Ireland, a region that came into existence in 1921 and which has remained within the United Kingdom, a new police force was formed in June 1922 called the Royal Ulster Constabulary (RUC). This force had its own CID from the start. In November 2001, the RUC was replaced by the Police Service of Northern Ireland (PSNI). === Japan === Criminal investigation departments or bureaus are set up within each Prefectural police headquarters. They maintain two investigation divisions (捜査課, ''sousa-ka'') (third or even fourth divisions are established in some urban prefecture), a organised crime investigation division (組織犯罪対策課, ''soshikihanzai-taisaku-ka'') (reinforced as an independent department or headquarters in the TMPD and some prefecture), a mobile investigation unit, and a identification division (鑑識課, ''kanshiki-ka''). The mobile investigation units (機動捜査隊, ''kidō sousa-tai'') are first responders for initial criminal investigations, distributed among the region with unmarked cars. The special investigation teams (特殊事件捜査係, ''tokushu-jiken sousa-kakari'') are specialised detective units of the first investigation divisions, well acquainted with new technologies and special tactics including SWAT capabilities. === Kenya === === Malaysian === The CID of the Royal Malaysian Police is involved with the investigation, arrest, and prosecution of crimes that affect people (e.g. murder, robbery with firearms, rape and injury) and property crime (e.g. theft and house-breaking). Modeled on the British police, this department enforces laws regarding gambling, "sin" and the Triad in Malaysia. === Pakistan === The CID in Pakistan is a special unit of the provincial and metropolitan police departments, responsible for carrying out investigations into crimes, including terrorism, murders, organised crime and sectarianism. The special branch of the CID in the Asia Division (CIDA) was a division of this department but is currently not operational. It had only 12 members, the names of which are not available because of security issues. === Singapore === The Singapore Police Force's CID is the agency for premier investigation and staff authority for criminal investigation matters within the Singapore Police Force. === Sri Lanka === The CID of the Sri Lanka Police Service is responsible for carrying out investigations into crimes including murder and organised crime. It was established in 1870. === United Kingdom === Detectives are usually either assigned to a CID unit within a local policing command, or to a central specialised unit dealing with a specific type of crime, such as fraud or sexual offences. Most local police stations have more uniformed officers than CID officers; a smaller station might have five DCs with a Detective Sergeant (DS) in command, while a larger station would have more CID officers under a detective of higher rank. A particular case would be assigned to a Senior Investigating Officer (SIO) whose rank would depend on the seriousness of the crime and their force's policy. Detectives in the United Kingdom do not have a separate rank system and are not senior to uniformed officers who hold the same rank, however, a senior detective does outrank a uniformed officer of a lower rank. for example a Detective Inspector outranks a uniformed Sergeant. Before 1999, female detectives' ranks were prefixed with "Woman", as in other branches of the police. The head of the CID in most police forces is a Detective Chief Superintendent. Ranks are abbreviated as follows: * Detective Constable (DC or Det Con) * Detective Sergeant (DS or Det Sgt) * Detective Inspector (DI or Det Insp) * Detective Chief Inspector (DCI or Det Ch Insp) * Detective Superintendent (DSU or Det Supt) * Detective Chief Superintendent (DCS or Det Ch Supt) To join a CID in the United Kingdom, a police officer usually must have served in uniform for at least two years. From 2017 direct entry to the detective branch became possible. While training as a detective they are referred to as a ''Trainee Detective Constable'' (TDC) and after completing the national Initial Crime Investigators' Development Programme, typically taking around two years, they become full Detective Constables (DCs). There is generally no pay increment on obtaining detective status in most forces. Previously paid allowances such as the detective duty allowance (a small payment intended to allow officers to purchase refreshments and other similar petty cash purposes) and the plainclothes allowance (an allowance used to purchase suitable clothing) have all been withdrawn over the past few years.<sup>[''citation needed'']</sup> ==== Military investigations[edit] ==== The Royal Military Police (RMP), Royal Navy Police (RNP), and RAF Police all maintain a Special Investigation Branch (SIB), fulfilling much the same role as a civilian CID. The Ministry of Defence Police is a civilian force that provides policing services on military bases, and as such has a CID much like a territorial police force. The RMP SIB has regular sections and one Army Reserve section. To join the reserve section, a reservist must either have a regular army SIB or civilian CID background. == See also == 82ed154622dadf14dcd75c5034592f0bcdc5fb6e 41 40 2024-03-16T10:36:09Z Motzoid India 2 wikitext text/x-wiki ''This is an Article for the Police force in Various countries, For Indian T.V please see [[CID (Indian TV series)]]'' The '''Criminal Investigation Department''' ('''CID''') is the branch of a police force to which most plainclothes detectives belong in the United Kingdom and many Commonwealth nations. A force's CID is distinct from its Special Branch (though officers of both are entitled to the rank prefix "Detective"). The name derives from the CID of the Metropolitan Police, formed on 8 April 1878 by C. E. Howard Vincent as a re-formation of its Detective Branch. British colonial police forces all over the world adopted the terminology developed in the UK in the 19th and early 20th centuries, and later the police forces of those countries often retained it after independence. English-language media often use "CID" as a translation to refer to comparable organisations in other countries. == By country == === Afghanistan === The ''Criminal Investigation Department'' is under the Afghan National Police. === France === Further information: Judicial police (France) The Direction Centrale de la Police Judiciaire (DCPJ) is the national authority of the criminal division of the French National Police. Its function is to lead and co-ordinate the action of the law enforcement forces against crime. === Germany, Austria and Switzerland === ''Kriminalpolizei'' is the standard term for the criminal investigation agency within the police forces of Germany, Austria, and the German-speaking cantons of Switzerland. === Hong Kong === The Hong Kong Police Force's CID is a sub-branch unit within the Criminal Intelligence Bureau under the crime wing of the ''B'' department (crime and security). === India === ''"Crime Branch" redirects here. For the 1989 Malayalam film, see [[Crime Branch (film).]]'' Many state police forces in India possess a CID (sometimes known as the ''investigation branch'') as a specialised wing. Personnel attached to this wing work in plain clothes, or ''mufti''. A CID may contain sub-branches, for instance the CID in Uttar Pradesh includes the state crime investigation bureau, finger print bureau and scientific section. Like their counterparts in the law and order police, the crime branch has its own ranks up to the level of additional director general of police or special commissioner of police. The crime branch has senior officers like superintendents, inspectors and sub-inspectors. Officers and men attached to this wing generally add the prefix ''detective'' before their regular police rank. While the name "CID" is used in several states, some states use different names for their CID units. In Andhra Pradesh, Chhattisgarh, and , the CID is known as the Crime Investigation Department. In Assam, Bihar, Haryana, Uttar Pradesh, Rajastan, West Bengal, Maharashtra, Karnataka and Jammu and Kashmir, it is known as the Criminal Investigation Department. In Delhi and Kerala, the CID is referred to as the Crime Branch, and in Tamilnadu, it is known as the Crime Branch - Criminal Investigation Department (CB-CID). The crime branch's tasks are to investigate criminal cases, which span across multiple districts or states. The CID may also take up complicated cases like communal riot cases, circulation of counterfeit currency or very complicated murder cases. A crime branch investigation is ordered either by a judicial court, by the director-general of police, or the government. Crime branch officers can be transferred to the law and order police, and vice versa. The crime branch is different from the crime detachment or crime squad. Crime Detachment and Crime Squads are a group of regular law and order policemen (who generally wear the uniform specifically detailed by the police inspector to work in plain clothes to keep a tab on local criminal elements, prostitutes, petty thieves, and other habitual offenders. === Indonesia === Indonesian Police investigators from the criminal investigation unit The criminal investigation units within the Indonesian National Police are called ''sat-reskrim'' (''satuan reserse kriminal'') meaning "criminal investigation unit", it is under the ''bareskrim'' (''badan reserse kriminal'') "criminal investigation agency" which is under the command of the national police headquarters. Every regional police force in Indonesia has this unit; they are concerned with conducting criminal investigations and identification activities. === Ireland === The Royal Irish Constabulary (RIC) maintained a CID along British lines before the independence of most of Ireland in December 1922. After the Partition of Ireland and the establishment of the Irish Free State in the early 1920s, the Government of the Irish Free State set up a CID for the purposes of counter-insurgency during the 1922-1923 Irish Civil War. It was separate from the unarmed Civic Guard, which later became the Garda Síochána. The Garda today operates local detective squads and several specialised, national detective units, including the National Bureau of Criminal Investigation. In Northern Ireland, a region that came into existence in 1921 and which has remained within the United Kingdom, a new police force was formed in June 1922 called the Royal Ulster Constabulary (RUC). This force had its own CID from the start. In November 2001, the RUC was replaced by the Police Service of Northern Ireland (PSNI). === Japan === Criminal investigation departments or bureaus are set up within each Prefectural police headquarters. They maintain two investigation divisions (捜査課, ''sousa-ka'') (third or even fourth divisions are established in some urban prefecture), a organised crime investigation division (組織犯罪対策課, ''soshikihanzai-taisaku-ka'') (reinforced as an independent department or headquarters in the TMPD and some prefecture), a mobile investigation unit, and a identification division (鑑識課, ''kanshiki-ka''). The mobile investigation units (機動捜査隊, ''kidō sousa-tai'') are first responders for initial criminal investigations, distributed among the region with unmarked cars. The special investigation teams (特殊事件捜査係, ''tokushu-jiken sousa-kakari'') are specialised detective units of the first investigation divisions, well acquainted with new technologies and special tactics including SWAT capabilities. === Kenya === === Malaysian === The CID of the Royal Malaysian Police is involved with the investigation, arrest, and prosecution of crimes that affect people (e.g. murder, robbery with firearms, rape and injury) and property crime (e.g. theft and house-breaking). Modeled on the British police, this department enforces laws regarding gambling, "sin" and the Triad in Malaysia. === Pakistan === The CID in Pakistan is a special unit of the provincial and metropolitan police departments, responsible for carrying out investigations into crimes, including terrorism, murders, organised crime and sectarianism. The special branch of the CID in the Asia Division (CIDA) was a division of this department but is currently not operational. It had only 12 members, the names of which are not available because of security issues. === Singapore === The Singapore Police Force's CID is the agency for premier investigation and staff authority for criminal investigation matters within the Singapore Police Force. === Sri Lanka === The CID of the Sri Lanka Police Service is responsible for carrying out investigations into crimes including murder and organised crime. It was established in 1870. === United Kingdom === Detectives are usually either assigned to a CID unit within a local policing command, or to a central specialised unit dealing with a specific type of crime, such as fraud or sexual offences. Most local police stations have more uniformed officers than CID officers; a smaller station might have five DCs with a Detective Sergeant (DS) in command, while a larger station would have more CID officers under a detective of higher rank. A particular case would be assigned to a Senior Investigating Officer (SIO) whose rank would depend on the seriousness of the crime and their force's policy. Detectives in the United Kingdom do not have a separate rank system and are not senior to uniformed officers who hold the same rank, however, a senior detective does outrank a uniformed officer of a lower rank. for example a Detective Inspector outranks a uniformed Sergeant. Before 1999, female detectives' ranks were prefixed with "Woman", as in other branches of the police. The head of the CID in most police forces is a Detective Chief Superintendent. Ranks are abbreviated as follows: * Detective Constable (DC or Det Con) * Detective Sergeant (DS or Det Sgt) * Detective Inspector (DI or Det Insp) * Detective Chief Inspector (DCI or Det Ch Insp) * Detective Superintendent (DSU or Det Supt) * Detective Chief Superintendent (DCS or Det Ch Supt) To join a CID in the United Kingdom, a police officer usually must have served in uniform for at least two years. From 2017 direct entry to the detective branch became possible. While training as a detective they are referred to as a ''Trainee Detective Constable'' (TDC) and after completing the national Initial Crime Investigators' Development Programme, typically taking around two years, they become full Detective Constables (DCs). There is generally no pay increment on obtaining detective status in most forces. Previously paid allowances such as the detective duty allowance (a small payment intended to allow officers to purchase refreshments and other similar petty cash purposes) and the plainclothes allowance (an allowance used to purchase suitable clothing) have all been withdrawn over the past few years.<sup>[''citation needed'']</sup> ==== Military investigations[edit] ==== The Royal Military Police (RMP), Royal Navy Police (RNP), and RAF Police all maintain a Special Investigation Branch (SIB), fulfilling much the same role as a civilian CID. The Ministry of Defence Police is a civilian force that provides policing services on military bases, and as such has a CID much like a territorial police force. The RMP SIB has regular sections and one Army Reserve section. To join the reserve section, a reservist must either have a regular army SIB or civilian CID background. == See also == c2f69c80c1843e95173d923bae62886b04497d1e CID (Indian TV series) 0 27 33 2024-03-15T15:27:05Z Motzoid India 2 Created page with "'''''CID''''' is an Indian police procedural television series originally aired on Sony Entertainment Television from 1998 to 2018. The series was created by B. P. Singh and stars Shivaji Satam as ACP Pradyuman, Aditya Srivastava as Sr. Inspector Abhijeet, Dayanand Shetty as Sr. Inspector Daya, Dinesh Phadnis as Inspector Fredricks aka Freddy and Narendra Gupta as Forensic expert Dr. Salunkhe respectively. The location of ''CID'' is set in Mumbai. The series aired for 2..." wikitext text/x-wiki '''''CID''''' is an Indian police procedural television series originally aired on Sony Entertainment Television from 1998 to 2018. The series was created by B. P. Singh and stars Shivaji Satam as ACP Pradyuman, Aditya Srivastava as Sr. Inspector Abhijeet, Dayanand Shetty as Sr. Inspector Daya, Dinesh Phadnis as Inspector Fredricks aka Freddy and Narendra Gupta as Forensic expert Dr. Salunkhe respectively. The location of ''CID'' is set in Mumbai. The series aired for 20 years on Sony Entertainment Television and is one of the longest-running television series in India. The series first premiered on 21 January 1998 and aired its 500th episode on 18 January 2008, 1000th episode on 13 September 2013, 1500th episode on 25 February 2018 and the last episode on 27 October 2018. == Cast[edit] == === Main === * Shivaji Satam as ACP Pradyuman (1998–2018). Initially referred as Sr. Inspector Pradyuman in the first few episodes after which he got a promotion to ACP in episode "''The Case of the Thief Within – I''" and had been referred to ACP Pradyuman since. * Dinesh Phadnis as Inspector Fredricks "Freddy" (1998–2018). He first appeared in episode "''Kissa Raat Ke Shikhar Ka – I''", but his role as Sub-Inspector started in episode "''The Case of the Third Man – I''" where he was initially referred as Sub Inspector Prince/Michael but referred as Fredricks from episode ''"The Case of the Last Five Minutes – I"''. * Ashutosh Gowariker as Sr. Inspector Virendra (1998–1999). He first appeared in episode "''The Case of the Thief Within – I''". His last episode in the show was episode "''The Case of Missing Fugitive – II''". He was transferred. * Dayanand Shetty as Sr. Inspector Daya (1998–2018). He first appeared in episode "''The Case of the Anonymous Threats – I''" as Sub Inspector Daya. He is referred to as Senior Inspector Daya in later episodes. * Narendra Gupta as Dr. R. P. Salunkhe (1998–2003, 2005, 2007–2018). He made his debut in the episode "The Case of the Incomplete Letter", where he was initially referred to as Dr. Verma but referred to as Dr. Salunkhe from episode "''The Case of the Burnt Letter – I''". * Aditya Srivastava as Sr. Inspector Abhijeet (1998, 1999–2018). He first appeared as character named 'Paresh', who stole ACP's gun in episode "''The Case of the Stolen Gun''". His role as Inspector Abhijeet started in the episode "''The Case of the Stolen Dynamite – I''". === Recurring === * Afshan Khan as Sub-Inspector Mridula (1998). She first appeared in episode "''Case of the Thief Within – I''". * Ashwini Kalsekar as Sub-Inspector Asha (1998–2004). She first appeared in the episode "''The Case of Second Statement – I''". Her last episode was episode "''Case of the Dazed Man – II''". * Dhananjay Mandrekar as Sub-Inspector Sudhakar (1998–2005). He appeared as Sub Inspector Bhonsale in starting episodes but after episode 35 he was referred as Sub Inspector Sudhakar. He was last seen in episode "''The Case of the Stolen Ring – I''". * Vaquar Shaikh as Inspector Jeet (1998). He appeared in episode "''The Case of the Contract Killer''" * Sanjay Shemkalyanee as Sub-Inspector Desai (1998) * Manoj Verma as Sub-Inspector Shinde (1998) * Dilip Kulkarni as DCP Dipankar Deshmukh (1998–2002). He was first seen in episode 7 and was last seen on episode The Case of the Invisible Bullet- II * Shweta Kanoje as Neha (1998) * Sanjeev Seth as Sub-Inspector Sanjeev (1998). He first appeared in episode "''The Case of the Anonymous Threats – I''". Additionally, he also appeared as a case victim named Sanjeev in episode "''The Case of The Red Cloth – I''". * Tushar Dalvi as Inspector Jayant (1999). He first appeared in episode "''The Case of Cross Connection – I''". He was last seen in episode "''The Case Of Stolen Dynamite – ll''". * Mouli Ganguly as Dr. Amrita (2002). She appeared as junior Forensic Doctor in episode "''The Case Of the Invisible Bullet – I''" when Dr. Salunkhe was accused by ACP for hiding the bullet used in the murder. * Shweta Kawatra as Dr. Niyati Pradhan (2003, 2005–2007). She first starred in "''The Case of Nailing the Suspect – I''". She was last seen in episode "''The Case of Perfect Murder''". * Mandeep Bhandar as Dr. Vrinda Wagle (2003–2004). Her first episode was episode "''The Case of the Red Rain – l''". Her last episode was "''The Case of the Dazed Man – II''". * Mona Ambegaonkar as Dr. Anjalika Deshmukh (2004–2005) Her first episode was episode "''Case of the Invisible Bomb – I''". She was last seen in episode "''Murder By Marriage – I''". * Rahil Azam as Nakul Pradyuman / Rajeev (2004–2005, 2015) ACP Pradyuman's criminal son first seen in episode "''Murders at Sunrise – II''" and killed by Pradyuman in episode "''Trail in London – III''". * Manav Gohil as Inspector Daksh (2002–2005) His first episode as a cop was "''The Case of the Flashing Light – I''". His last episode was "''Trail in London – II''". He was killed by Nakul. * Smita Bansal as Inspector Aditi (2004–2005) Her first episode was "''The Case of the Haunted Building – I''". Her last episode was "''Mad Bomber – II''". She died in the episode. * Surendra Pal as DCP (2005). His first episode was "''The Case of the Killer Lake – l''". He was last seen in episode "''Face Off – lll''". * Kavita Kaushik as Sub-Inspector Anushka (2005–2006). She appeared in episodes "Trail in London" (all parts) as a Central Intelligence Sub-Inspector who secretly helps ACP Pradyuman. She enters CID in episode "Poison In The Nail – l". Her last episode was "Secret of the Code No. 571E1115". * Sai Deodhar as Sub-Inspector Priyanka (2005) Her first episode was "''Case of the Dead Waiter – I''". Her last episode was "''Trail in London – lll''" * Rajeev Khandelwal as ACP Prithviraj (2005, 2008) He appeared as the ACP in episodes: "''Face Off – lll & lV''" and "''Trail in London''" (all parts) when ACP Pradyuman was in London for the investigation. He was also in the episode "''The Case of the Missing Bride''" as himself. * B. P. Singh as DCP Shamsher Singh Chitrole (2005–2016). His first appearance was as DIG Shamsher Singh in the episode "''Face Off-lll''". After a long time he appears as DCP Shamsher Singh Chitrole, the senior of the CID team and also an egoistic man who is also quite funny sometimes. He was a friend of ACP Pradyuman in college. * Vivek Mashru as Sub-Inspector Vivek (2006–2012). His first episode was "''The Case of the Killer Eyes''". He was last seen in episode "''Rahasyamay Bullet – III''". * Amar Upadhyay as Inspector Rishi (2006). He appeared as an inspector in episode "Murder in the Safety Vault". He joined the CID in that episode when he came to Mumbai for spend holidays. He was also seen as a supporting character named Harry in episode "Return of the Clown". * Priya Wal as Dr. Nyla Rajadhyaksha (2006–2007). Her first episode was "The Case of the Killer Statues". Her last episode was "The Case of the Dangerous Lady". * Alka Verma as Sub-Inspector Muskaan (2006–2007). Her first episode was episode "Red Rose Killer". "The Case of Inspector Daya's Abduction" was her last episode. She was transferred. * Shraddha Musale as Dr. Tarika (2007–2018). Her debut episode was "The Don's Final Revenge". * Megha Gupta as Sub-Inspector Devyana (2007–2008) Her first episode was "The Don's Final Revenge" and she played her character till episode 492 "Mystery Of A Train Passenger". But then she was not seen again for 11 consecutive episodes and officially her last episode was "Bhoot Bangala". * Parinita Seth as Sub-Inspector Kaveri (2008). She first appeared as Shreya in episode "The Great Diamond Robbery" and as Rohini in episode "The "''Curse of the Rose Queen''", but as a cop her first appearance was in Episode "''Khoon Bhari Holi''", recruited by ACP Pradyuman through interview. In Episode 524 she was revealed to have gone for a Special Training in Delhi. But she made a comeback in episode "''Triangular Bullet's Mystery''". Her last episode was "''Khooni Goli Ka Rahasya''". * Jimmy Kunal Nanda as Sub-Inspector Lavanya (2008–2009) She was first seen spying on the CID team in episode "''Khoon Bhari Holi''". She was revealed as the new CID officer in episode "''Katil Kaun Dohri Uljhan''". She was last seen in episode "''Students Mass Murderer''". * Vaishnavi Dhanraj as Sub-Inspector Tasha Kumar (2009–2010). She first appeared as an episodic character named Nathalia in episode "''Qaatil Dank''". Her first episode as a CID cop was episode "''Anjaan Laash''". Her last episode was Episode "''Khatre Mein Tasha''" in which she dies. * Hrishikesh Pandey as Sr. Inspector Sachin (2010–2016). He first appeared in episode "''Khooni Deewar''" as an undercover CID cop under the alias Siddharth, but in middle of the episode CID team finds out that he is an undercover. Later he is introduced by ACP as Inspector Sachin in episode "''Maut ka Aashirwad''". He was last seen in episode "''Bank Robbery''". Also in CID Special Bureau, he played the role of Inspector Abhimanyu. * Jasveer Kaur as Sub-Inspector Kajal (2010–2012). She was first seen as a contract killer in episode "The Case of the Mysterious Gift" and a drug seller in episode "''The Case of the Talking Parrot''". Her first episode as a cop was episode "''Maut Ka Aashirwad''". Her last episode was "''Khoon Ka Deewana''". * Manini Mishra as Dr. Sonali Barwe (2010–2011) She was first seen as an actress Kushi in episode "''The Secret of the Deadly Chest''" and fashion designer Menka in episode ''"Zehrily Dress''". Her first episode as a forensic expert was ''"Rahasyamayi Darwaza''". * Abhay Shukla as Inspector Nikhil (2010–2016). His first appearance as a reporter ''"Traitors in CID"''. Next seen as security guard Ishaan in episode "Once Upon A Time in Mumbaai" and a shopkeeper in episode "''Bhutiya Ladki Ka Raaz''". He also played a negative role in his own name Abhay in the episode "''AKAKR part-9''". His first episode as a CID cop was episode "''Qatl Ka Raaz Mare Hue Qatl Ke Paas''". He was last seen in episode "''Raaz Machli Ka''". * Ansha Sayed as Inspector Purvi (2011–2018). She was first seen as episodic character named ''Chandha'' in episode "Case of the Double Identity", ''Khushi'' in episode "Case of the Bomb Robbery", Pallavi in episode "''7 Days to Die''" and Pamela in episode "''The Gift''". Her first episode as Sub-Inspector Purvi was episode "''Kissa Paagal Ashiq Kaa''". * Janvi Chheda as Inspector Shreya (2012–2016, 2018). She made her debut in episode "''Raaz Sar Aur Haath Ka''" where she was introduced along with Sub-Inspector Vineet. She was last seen in episode "''Maut Ka Hathoda''". She returned as an Intelligence Bureau Inspector in episode "CID 20 Saal Baad". * Vikas Kumar as Sr. Inspector Rajat (2012–2013). He joined in Episode "Khooni Paani". He was last seen in episode "Ped Ka Rahasya". * Ajay Nagrath as Sub-Inspector Pankaj (2012–2018). He made his debut in the episode "CID Par Grahan – III". * Vineet Kumar Chaudhary as Sub-Inspector Vineet (2012–2013). His first episode was "Raaz Sar Aur Haath Ka" where he was introduced along with Sub-Inspector Shreya. His last seen in episode "Raaz Teen Laashon Ka". * Neha Gadoria as Trainee Officer Roma (2012) Her first episode was episode "Khoon Khabri Ka". She died in Episode "Khatre Mein CID Officer – II" due to being kidnapped and overflow of blood. * Saanand Verma as Lab Assistant (2012) * Maninder Singh as Sr. Inspector Dushyant Hemraj (2014). His first episode was episode "Bus Hijack – l". His last episode was episode "Kulhaadi Ka Raaz". * Gaurav Khanna as Sr. Inspector Kavin (2014). His first episode was episode "Bus Hijack – ll". His last episode was episode "Band Kamre Mein Laash". * Tanya Abrol as Sub-Inspector Jaywanti Shinde (2014–2016) Her first episode was episode "Action Jackson". She was last seen in episode "Bank Robbery". * Tarun Khanna as Inspector Suraj (2012–2013). He was first appeared as supporting character named Rohan in episode "Gawah Bana Shikaar" and Rajveer in episode "Case of the Hotel Murder Mystery". His first episode as cop was "CID Par Grahan – III". He was last seen in episode "Raaz Haddiyo Ki Crockery Ka". * Deepak Shirke as ACP Digvijay (2012–2013). He was brought in CID by DCP Chitrole as the new ACP in place of Pradyuman in episodes: "CID Par Grahan – ll, lll, lV". It was later revealed that he committed a crime long ago. * Jagjit Athwal as Sub-Inspector Vansh (2014–2016). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * KK Goswami as Dhenchu (2013–2014, 2016–2018) He is an informer introduced by DCP Chitrole in episode "CID Ke Chhote Fans" of CID Chhote Heroes. * Ankur Sharma Kabir as Sub-Inspector Karan (2014–2015). His first episode as a cop was "Mumbai Ki Chawl Ka Rahasya – l". * Vikas Salgotra as Sub-Inspector Mayur (2014–2016). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * Pooja Khatri as Sub-Inspector Ishita (2014–2016). Her first episode was "Mumbai Ki Chawl Ka Rahasya – l". She was last seen in "Karo Ya Maro – III". * Amaani Satrala as Sub-Inspector Divya (2014–2015). Her first episode was "Mumbai Ki Chawl Ka Rahasya – l". She was last seen in "Badle Ki Aag" * Abid Shaikh as Sub-Inspector Vikram (2014). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * Kuldeep Singh as Dr. Vaibhav (2014). He appeared as junior forensic doctor. His first episode was "Mumbaicha Dabbawala". * Vivana Singh as Cyber Inspector Ritu (2017–2018) * Yagya Bhasin as Arjun (2018) Nakul's son, ACP Pradyuman's grandson * Manoj Ramola as Ashok (2018) * Shweta Salve as Supervisor Sheetal (2018). She appeared as a supervisor who monitors the CID team in episodes "Rahasyamai Gavah". She died in episode "Rahasyamayi Hathyar" to save lives of many people against a mysterious weapon. === Guest === * Sahil Chadha as Ajay Sethia (1998) * Milind Gawali as Sailesh (1998), Alok (1999), Devdhar (1999), Anupam (2002), Kuber (2003), Shyaman (2004) * Girish Sonar as Tipnis (1998), Reporter Raghu (1999) * Mohan Gokhale as Suvarna (1998), Kavi (1999) * Achyut Potdar as Kundan Seth (1998) * Anant Jog as Adv. Jagtap, Shashank (1998), Chandresh (2006) * Madan Jain as Naveen Kumar (1999) * Pavan Malhotra as Jeevan/kailash (1999), Ramesh (2001), Mahesh (2001), Satish (2002), Robin (2007) * Rajesh Khera as Jagdish (1999), Mangal (2000), Dushyant (2000), Dr Alok (2001), Badshah (2001), Johnny (2002), Kedar (2002), Rajiv (2004), Film Director (2004), Dance Choreographer (2004), Jaan (2006), Vishwajeet (2006) * Ravi Jhankal as Nagesh (1998), Kamalkant (1999), Kishorelal (1999), Kumar (1999), Dr. Brijendra (real) (2001), Moti (2002), ACP's friend (2004), Dr. Vikas (2006), Virendra (2010) * Akshay Anand as Bharat Saxena (1999), Rajeev (2004) * Manav Kaul as Neeraj (2000), Vikrant's brother (2000), Kantora (2003), Suraj (2006). * Shrivallabh Vyas as CBI Officer Shamsher (2000), Baldev (2001), Dr. Sahil (2001), DIG Baldev Raj (2002), Retd. Judge Raja Rao (2005), Lalchand (2007), Mr.Trout (2007), Jeevan Das (2007) * Manoj Joshi as Ranjan (2000), Drug lord (2000), Mahesh (2002), Dr Kanu (2002) * Aasif Sheikh as Varun Episodes : "The Case of the Mysterious Truck PART I-II″ (2005 ), as Raghav Episode : "Paheli Laash Ke Tukdon Ki" (2009) * Adi Irani as Deepak (2001), Radio Manager Raman (2006), Tejpal (2016) * Nawazuddin Siddiqui as Alex (2001) (episode 157–158) * Prem Chopra as Raj (2001) * Om Puri as Sunder alias ACP Jose Santos in episode "The Case of the Counterfeit Cop".(2001) * Sanjay Mishra as Rajesh (2001) * Kashmera Shah as Kinneri (2001) * Milind Gunaji as Johnny (2001) * Sarita Joshi as Advocate Suhasini (2001) * Sanjay Batra as Vinay (2001) * Mushtaq Khan as Bacchu (2001) * Madhukar Toradmal as Business man Gupta, victim's father * Dinesh Hingoo as Builder Chunnilal (2001) * Gufi Paintal as Chander (2001) * Viju Khote as Judge (2002), Deaf man (2006) * Bhagyashree as Nupur (2001) * Shishir Sharma as Kumar, Arjun (1998), Shailesh (1998) * Arif Zakaria as Chandan (2002) * Deepak Qazir as Taxi Driver (2000) * Kapil Dev as himself in episode "Howzzat?" (2003) * Sudhir as Dr Kailash / Jinjaar/ Mr. Eliott (2003) * Ananya Khare as Shilpa (2002), Sunita (2004) * Rajesh Khattar as Pramod (2000), Rajesh (2006) * Bhairavi Raichura as Reshma (2005) * Abhijeet Sawant as himself (2005) * Sadashiv Amrapurkar as Subbu (2005) * Baba Sehgal as himself (2006) * Mandira Bedi as Reshma (2001), Saagrika (2005) * Bharat Kapoor as Sudhakar (1998) and Intelligence Officer Raman Kapoor (2002) * Kunika as Rakhi (2001) * Rajiv Paul as Jeevan (2000) * Murli Sharma as Giri (2000), Govinda(2005), Contract killer(2006), Dr O (2007) * Shahbaz Khan as Karan (2006), Don (2007) * Paintal as mute man (2006) * Lilliput as Blind Man (2006) * Deepshika Nagpal as Lavanya Daneka a Tarot Card Reader Ep: Maut Ka Saudagar, Vyoma, Sudeep's Wife, Ep430:The Invisible Eye Witness (2006) * Shilpa Shinde as Sheetal in "The Case of Mysterious Shadows" (2006) * Vishal Kotian as RJ Sunny (2006) * Melissa Pais as Alice in episode: Murder in FM 97.1 (2006) * Mihir Mishra as KeniRaj in "Body in the Suitcase". (2006) * Dalljeit Kaur as Reshma/Neha E in "Body in the Suitcase" (2006), Sreeja in "The Invisible Eye Witness". (2006) * Narayani Shastri as Sunanda, Abhijeet's Friend Parthav's Wofer in "he Mysterious Gift". (2006) * Salman Khan as himself (2009) Khooni Piracy Racket in (Episode 583) and (2014) Salman Ki Kick in (Episode 1107 and 1108) * R. Madhavan as himself (2009) Mystery Code Murders in (Episode 556) * Avantika Shetty as Mansi(2009) in Students Mass Murder, as Ruhi(2009) in Bhoola bhutka * Sajid Khan as himself (2009) * Mahek Chahal as herself (2009) * Rituraj Singh as Deven, Hiten (2009) * Inder Kumar as himself (2009) * Sarfaraz Khan as himself (2009) * Yami Gautam as Ananya (2010) (episode 642, "Girl in Coffin") * Lavanya Tripathi as Sakshi in the case 'Maut ka Ashirvad' (Episode 619) (2010) * Nikhil Guharoy as Vijay (2009), Aman (2009), Anuj (2010), Sid (2011), Nitin (2011), Kunal (2012), Rishi (2013), Dr. Harshit (2013), Arun (2013), Hardik (2014), Sarthak, Randhir, Sundar and Vikram. He also appeared in "Maut ka Ashirwad" (2010) and "Aakhri Chunauti" (2010) as Sub-Inspector Kajal's brother Rahul Kumar. * Mahesh Manjrekar as H.D. (Harpez Dongara) (2010) He acted as a dangerous criminal who kidnapped all the CID officers and forensic experts and left India. Later in episode 664 Abhijeet shot him and he died. * Dino Morea as Nitin (2010), himself (2011) * Emraan Hashmi as himself (2010), Director Abraham (2011) and Raghuram "Raghu" Rathore aka Mr. X (2015). * Sonalika Prasad as Sheela in "Jhagdalu Aurat" (2015). * Prachi Desai as herself (2010). * Ronit Roy as K.D Pathak from ''Adaalat'' (2010, 2012, 2014) * Rani Mukerji as herself (2011) * Shaji Choudhary as Gangster (2003), Trilok (2008), Heera (2009), Nibo, Goga (2011), Shera, Vikram, Mewaram (2012) * Aamir Khan as Senior Inspector Surjan Singh Shekhawat (2012) * Kareena Kapoor Khan as herself (2012) * Akshay Kumar as Shiva (2012) and as Rowdy Rathore (2012). * Sonakshi Sinha as Paro (2012), herself (2013) * Imran Khan as himself (2013) * Akanksha Puri as Nandita Menon (2015) * Sunny Deol as Saranjeet Singh Talwar aka Singh Saab (2013) and Ajay Mehra (2016) * Chandan Madan as Akhil/Tez/Sumeet/Samrat/Manav/Sameer (2011–2018) * Dilip Joshi as Jethalal Champaklal Gada from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Disha Vakani as Daya Jethalal Gada from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Gurucharan Singh as Roshan Singh Harjeet Singh Sodhi from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Shyam Pathak as Patrakaar Popatlal from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Munmun Dutta as Babita Krishnan Iyer from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Mandar Chandwadkar as Aatmaram Tukaram Bhide from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Jimmy Sheirgill as Vishnu Sharma (2014) * Anu Malik as himself (2014) * Jas Arora as Sunny / Pathan * Jackky Bhagnani as Abhimanyu Kaul (2014) * Govinda as Armaan (2014) * Saif Ali Khan as Yudi Jaitely (2014) * Tusshar Kapoor as Vikash Singh (2014) * Shraddha Kapoor as herself (Episode 1094) (2014) * Sidharth Malhotra as himself (Episode 1094) (2014) * Sunny Leone as Ragini (2014) * Thakur Anoop Singh as Daya (2014) in episode: Daya v/s Daya * Varun Dhawan as himself (2015) in episode : ''Varun Dhawan Khatre Mein'' * Shah Rukh Khan as himself (2015) * Sushant Singh Rajput as Byomkesh Bakshi (2015) * Anand Tiwari as Ajit Kumar Bandhopadhyay (2015) * Diganth as himself (episode 1288) (2015) * Karan Grover as himself (episode 1288) (2015) * Anushka Ranjan as herself (episode 1288) (2015) * Rahul Dev as Katori Damta. He played the negative role in ''Karo Ya Maro'' story arc. (2016) * Gauri Tonk as Dolly Harpez Dongara, wife of Harpez Dongara taking revenge from Abhijeet for Harpez's death in the ''Karo Ya Maro'' story arc. (2016) * Abbas–Mustan as themselves (2017) * Kiara Advani as herself (2017) * Tigmanshu Dhulia as Barbosa, Leader of The Eye Gang (2018) f1bf12b873ab56d066c18d5c2a2ce994d55473fe 34 33 2024-03-15T15:27:31Z Motzoid India 2 /* Cast[edit] */ wikitext text/x-wiki '''''CID''''' is an Indian police procedural television series originally aired on Sony Entertainment Television from 1998 to 2018. The series was created by B. P. Singh and stars Shivaji Satam as ACP Pradyuman, Aditya Srivastava as Sr. Inspector Abhijeet, Dayanand Shetty as Sr. Inspector Daya, Dinesh Phadnis as Inspector Fredricks aka Freddy and Narendra Gupta as Forensic expert Dr. Salunkhe respectively. The location of ''CID'' is set in Mumbai. The series aired for 20 years on Sony Entertainment Television and is one of the longest-running television series in India. The series first premiered on 21 January 1998 and aired its 500th episode on 18 January 2008, 1000th episode on 13 September 2013, 1500th episode on 25 February 2018 and the last episode on 27 October 2018. == Cast == === Main === * Shivaji Satam as ACP Pradyuman (1998–2018). Initially referred as Sr. Inspector Pradyuman in the first few episodes after which he got a promotion to ACP in episode "''The Case of the Thief Within – I''" and had been referred to ACP Pradyuman since. * Dinesh Phadnis as Inspector Fredricks "Freddy" (1998–2018). He first appeared in episode "''Kissa Raat Ke Shikhar Ka – I''", but his role as Sub-Inspector started in episode "''The Case of the Third Man – I''" where he was initially referred as Sub Inspector Prince/Michael but referred as Fredricks from episode ''"The Case of the Last Five Minutes – I"''. * Ashutosh Gowariker as Sr. Inspector Virendra (1998–1999). He first appeared in episode "''The Case of the Thief Within – I''". His last episode in the show was episode "''The Case of Missing Fugitive – II''". He was transferred. * Dayanand Shetty as Sr. Inspector Daya (1998–2018). He first appeared in episode "''The Case of the Anonymous Threats – I''" as Sub Inspector Daya. He is referred to as Senior Inspector Daya in later episodes. * Narendra Gupta as Dr. R. P. Salunkhe (1998–2003, 2005, 2007–2018). He made his debut in the episode "The Case of the Incomplete Letter", where he was initially referred to as Dr. Verma but referred to as Dr. Salunkhe from episode "''The Case of the Burnt Letter – I''". * Aditya Srivastava as Sr. Inspector Abhijeet (1998, 1999–2018). He first appeared as character named 'Paresh', who stole ACP's gun in episode "''The Case of the Stolen Gun''". His role as Inspector Abhijeet started in the episode "''The Case of the Stolen Dynamite – I''". === Recurring === * Afshan Khan as Sub-Inspector Mridula (1998). She first appeared in episode "''Case of the Thief Within – I''". * Ashwini Kalsekar as Sub-Inspector Asha (1998–2004). She first appeared in the episode "''The Case of Second Statement – I''". Her last episode was episode "''Case of the Dazed Man – II''". * Dhananjay Mandrekar as Sub-Inspector Sudhakar (1998–2005). He appeared as Sub Inspector Bhonsale in starting episodes but after episode 35 he was referred as Sub Inspector Sudhakar. He was last seen in episode "''The Case of the Stolen Ring – I''". * Vaquar Shaikh as Inspector Jeet (1998). He appeared in episode "''The Case of the Contract Killer''" * Sanjay Shemkalyanee as Sub-Inspector Desai (1998) * Manoj Verma as Sub-Inspector Shinde (1998) * Dilip Kulkarni as DCP Dipankar Deshmukh (1998–2002). He was first seen in episode 7 and was last seen on episode The Case of the Invisible Bullet- II * Shweta Kanoje as Neha (1998) * Sanjeev Seth as Sub-Inspector Sanjeev (1998). He first appeared in episode "''The Case of the Anonymous Threats – I''". Additionally, he also appeared as a case victim named Sanjeev in episode "''The Case of The Red Cloth – I''". * Tushar Dalvi as Inspector Jayant (1999). He first appeared in episode "''The Case of Cross Connection – I''". He was last seen in episode "''The Case Of Stolen Dynamite – ll''". * Mouli Ganguly as Dr. Amrita (2002). She appeared as junior Forensic Doctor in episode "''The Case Of the Invisible Bullet – I''" when Dr. Salunkhe was accused by ACP for hiding the bullet used in the murder. * Shweta Kawatra as Dr. Niyati Pradhan (2003, 2005–2007). She first starred in "''The Case of Nailing the Suspect – I''". She was last seen in episode "''The Case of Perfect Murder''". * Mandeep Bhandar as Dr. Vrinda Wagle (2003–2004). Her first episode was episode "''The Case of the Red Rain – l''". Her last episode was "''The Case of the Dazed Man – II''". * Mona Ambegaonkar as Dr. Anjalika Deshmukh (2004–2005) Her first episode was episode "''Case of the Invisible Bomb – I''". She was last seen in episode "''Murder By Marriage – I''". * Rahil Azam as Nakul Pradyuman / Rajeev (2004–2005, 2015) ACP Pradyuman's criminal son first seen in episode "''Murders at Sunrise – II''" and killed by Pradyuman in episode "''Trail in London – III''". * Manav Gohil as Inspector Daksh (2002–2005) His first episode as a cop was "''The Case of the Flashing Light – I''". His last episode was "''Trail in London – II''". He was killed by Nakul. * Smita Bansal as Inspector Aditi (2004–2005) Her first episode was "''The Case of the Haunted Building – I''". Her last episode was "''Mad Bomber – II''". She died in the episode. * Surendra Pal as DCP (2005). His first episode was "''The Case of the Killer Lake – l''". He was last seen in episode "''Face Off – lll''". * Kavita Kaushik as Sub-Inspector Anushka (2005–2006). She appeared in episodes "Trail in London" (all parts) as a Central Intelligence Sub-Inspector who secretly helps ACP Pradyuman. She enters CID in episode "Poison In The Nail – l". Her last episode was "Secret of the Code No. 571E1115". * Sai Deodhar as Sub-Inspector Priyanka (2005) Her first episode was "''Case of the Dead Waiter – I''". Her last episode was "''Trail in London – lll''" * Rajeev Khandelwal as ACP Prithviraj (2005, 2008) He appeared as the ACP in episodes: "''Face Off – lll & lV''" and "''Trail in London''" (all parts) when ACP Pradyuman was in London for the investigation. He was also in the episode "''The Case of the Missing Bride''" as himself. * B. P. Singh as DCP Shamsher Singh Chitrole (2005–2016). His first appearance was as DIG Shamsher Singh in the episode "''Face Off-lll''". After a long time he appears as DCP Shamsher Singh Chitrole, the senior of the CID team and also an egoistic man who is also quite funny sometimes. He was a friend of ACP Pradyuman in college. * Vivek Mashru as Sub-Inspector Vivek (2006–2012). His first episode was "''The Case of the Killer Eyes''". He was last seen in episode "''Rahasyamay Bullet – III''". * Amar Upadhyay as Inspector Rishi (2006). He appeared as an inspector in episode "Murder in the Safety Vault". He joined the CID in that episode when he came to Mumbai for spend holidays. He was also seen as a supporting character named Harry in episode "Return of the Clown". * Priya Wal as Dr. Nyla Rajadhyaksha (2006–2007). Her first episode was "The Case of the Killer Statues". Her last episode was "The Case of the Dangerous Lady". * Alka Verma as Sub-Inspector Muskaan (2006–2007). Her first episode was episode "Red Rose Killer". "The Case of Inspector Daya's Abduction" was her last episode. She was transferred. * Shraddha Musale as Dr. Tarika (2007–2018). Her debut episode was "The Don's Final Revenge". * Megha Gupta as Sub-Inspector Devyana (2007–2008) Her first episode was "The Don's Final Revenge" and she played her character till episode 492 "Mystery Of A Train Passenger". But then she was not seen again for 11 consecutive episodes and officially her last episode was "Bhoot Bangala". * Parinita Seth as Sub-Inspector Kaveri (2008). She first appeared as Shreya in episode "The Great Diamond Robbery" and as Rohini in episode "The "''Curse of the Rose Queen''", but as a cop her first appearance was in Episode "''Khoon Bhari Holi''", recruited by ACP Pradyuman through interview. In Episode 524 she was revealed to have gone for a Special Training in Delhi. But she made a comeback in episode "''Triangular Bullet's Mystery''". Her last episode was "''Khooni Goli Ka Rahasya''". * Jimmy Kunal Nanda as Sub-Inspector Lavanya (2008–2009) She was first seen spying on the CID team in episode "''Khoon Bhari Holi''". She was revealed as the new CID officer in episode "''Katil Kaun Dohri Uljhan''". She was last seen in episode "''Students Mass Murderer''". * Vaishnavi Dhanraj as Sub-Inspector Tasha Kumar (2009–2010). She first appeared as an episodic character named Nathalia in episode "''Qaatil Dank''". Her first episode as a CID cop was episode "''Anjaan Laash''". Her last episode was Episode "''Khatre Mein Tasha''" in which she dies. * Hrishikesh Pandey as Sr. Inspector Sachin (2010–2016). He first appeared in episode "''Khooni Deewar''" as an undercover CID cop under the alias Siddharth, but in middle of the episode CID team finds out that he is an undercover. Later he is introduced by ACP as Inspector Sachin in episode "''Maut ka Aashirwad''". He was last seen in episode "''Bank Robbery''". Also in CID Special Bureau, he played the role of Inspector Abhimanyu. * Jasveer Kaur as Sub-Inspector Kajal (2010–2012). She was first seen as a contract killer in episode "The Case of the Mysterious Gift" and a drug seller in episode "''The Case of the Talking Parrot''". Her first episode as a cop was episode "''Maut Ka Aashirwad''". Her last episode was "''Khoon Ka Deewana''". * Manini Mishra as Dr. Sonali Barwe (2010–2011) She was first seen as an actress Kushi in episode "''The Secret of the Deadly Chest''" and fashion designer Menka in episode ''"Zehrily Dress''". Her first episode as a forensic expert was ''"Rahasyamayi Darwaza''". * Abhay Shukla as Inspector Nikhil (2010–2016). His first appearance as a reporter ''"Traitors in CID"''. Next seen as security guard Ishaan in episode "Once Upon A Time in Mumbaai" and a shopkeeper in episode "''Bhutiya Ladki Ka Raaz''". He also played a negative role in his own name Abhay in the episode "''AKAKR part-9''". His first episode as a CID cop was episode "''Qatl Ka Raaz Mare Hue Qatl Ke Paas''". He was last seen in episode "''Raaz Machli Ka''". * Ansha Sayed as Inspector Purvi (2011–2018). She was first seen as episodic character named ''Chandha'' in episode "Case of the Double Identity", ''Khushi'' in episode "Case of the Bomb Robbery", Pallavi in episode "''7 Days to Die''" and Pamela in episode "''The Gift''". Her first episode as Sub-Inspector Purvi was episode "''Kissa Paagal Ashiq Kaa''". * Janvi Chheda as Inspector Shreya (2012–2016, 2018). She made her debut in episode "''Raaz Sar Aur Haath Ka''" where she was introduced along with Sub-Inspector Vineet. She was last seen in episode "''Maut Ka Hathoda''". She returned as an Intelligence Bureau Inspector in episode "CID 20 Saal Baad". * Vikas Kumar as Sr. Inspector Rajat (2012–2013). He joined in Episode "Khooni Paani". He was last seen in episode "Ped Ka Rahasya". * Ajay Nagrath as Sub-Inspector Pankaj (2012–2018). He made his debut in the episode "CID Par Grahan – III". * Vineet Kumar Chaudhary as Sub-Inspector Vineet (2012–2013). His first episode was "Raaz Sar Aur Haath Ka" where he was introduced along with Sub-Inspector Shreya. His last seen in episode "Raaz Teen Laashon Ka". * Neha Gadoria as Trainee Officer Roma (2012) Her first episode was episode "Khoon Khabri Ka". She died in Episode "Khatre Mein CID Officer – II" due to being kidnapped and overflow of blood. * Saanand Verma as Lab Assistant (2012) * Maninder Singh as Sr. Inspector Dushyant Hemraj (2014). His first episode was episode "Bus Hijack – l". His last episode was episode "Kulhaadi Ka Raaz". * Gaurav Khanna as Sr. Inspector Kavin (2014). His first episode was episode "Bus Hijack – ll". His last episode was episode "Band Kamre Mein Laash". * Tanya Abrol as Sub-Inspector Jaywanti Shinde (2014–2016) Her first episode was episode "Action Jackson". She was last seen in episode "Bank Robbery". * Tarun Khanna as Inspector Suraj (2012–2013). He was first appeared as supporting character named Rohan in episode "Gawah Bana Shikaar" and Rajveer in episode "Case of the Hotel Murder Mystery". His first episode as cop was "CID Par Grahan – III". He was last seen in episode "Raaz Haddiyo Ki Crockery Ka". * Deepak Shirke as ACP Digvijay (2012–2013). He was brought in CID by DCP Chitrole as the new ACP in place of Pradyuman in episodes: "CID Par Grahan – ll, lll, lV". It was later revealed that he committed a crime long ago. * Jagjit Athwal as Sub-Inspector Vansh (2014–2016). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * KK Goswami as Dhenchu (2013–2014, 2016–2018) He is an informer introduced by DCP Chitrole in episode "CID Ke Chhote Fans" of CID Chhote Heroes. * Ankur Sharma Kabir as Sub-Inspector Karan (2014–2015). His first episode as a cop was "Mumbai Ki Chawl Ka Rahasya – l". * Vikas Salgotra as Sub-Inspector Mayur (2014–2016). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * Pooja Khatri as Sub-Inspector Ishita (2014–2016). Her first episode was "Mumbai Ki Chawl Ka Rahasya – l". She was last seen in "Karo Ya Maro – III". * Amaani Satrala as Sub-Inspector Divya (2014–2015). Her first episode was "Mumbai Ki Chawl Ka Rahasya – l". She was last seen in "Badle Ki Aag" * Abid Shaikh as Sub-Inspector Vikram (2014). His first episode was "Mumbai Ki Chawl Ka Rahasya – l". * Kuldeep Singh as Dr. Vaibhav (2014). He appeared as junior forensic doctor. His first episode was "Mumbaicha Dabbawala". * Vivana Singh as Cyber Inspector Ritu (2017–2018) * Yagya Bhasin as Arjun (2018) Nakul's son, ACP Pradyuman's grandson * Manoj Ramola as Ashok (2018) * Shweta Salve as Supervisor Sheetal (2018). She appeared as a supervisor who monitors the CID team in episodes "Rahasyamai Gavah". She died in episode "Rahasyamayi Hathyar" to save lives of many people against a mysterious weapon. === Guest === * Sahil Chadha as Ajay Sethia (1998) * Milind Gawali as Sailesh (1998), Alok (1999), Devdhar (1999), Anupam (2002), Kuber (2003), Shyaman (2004) * Girish Sonar as Tipnis (1998), Reporter Raghu (1999) * Mohan Gokhale as Suvarna (1998), Kavi (1999) * Achyut Potdar as Kundan Seth (1998) * Anant Jog as Adv. Jagtap, Shashank (1998), Chandresh (2006) * Madan Jain as Naveen Kumar (1999) * Pavan Malhotra as Jeevan/kailash (1999), Ramesh (2001), Mahesh (2001), Satish (2002), Robin (2007) * Rajesh Khera as Jagdish (1999), Mangal (2000), Dushyant (2000), Dr Alok (2001), Badshah (2001), Johnny (2002), Kedar (2002), Rajiv (2004), Film Director (2004), Dance Choreographer (2004), Jaan (2006), Vishwajeet (2006) * Ravi Jhankal as Nagesh (1998), Kamalkant (1999), Kishorelal (1999), Kumar (1999), Dr. Brijendra (real) (2001), Moti (2002), ACP's friend (2004), Dr. Vikas (2006), Virendra (2010) * Akshay Anand as Bharat Saxena (1999), Rajeev (2004) * Manav Kaul as Neeraj (2000), Vikrant's brother (2000), Kantora (2003), Suraj (2006). * Shrivallabh Vyas as CBI Officer Shamsher (2000), Baldev (2001), Dr. Sahil (2001), DIG Baldev Raj (2002), Retd. Judge Raja Rao (2005), Lalchand (2007), Mr.Trout (2007), Jeevan Das (2007) * Manoj Joshi as Ranjan (2000), Drug lord (2000), Mahesh (2002), Dr Kanu (2002) * Aasif Sheikh as Varun Episodes : "The Case of the Mysterious Truck PART I-II″ (2005 ), as Raghav Episode : "Paheli Laash Ke Tukdon Ki" (2009) * Adi Irani as Deepak (2001), Radio Manager Raman (2006), Tejpal (2016) * Nawazuddin Siddiqui as Alex (2001) (episode 157–158) * Prem Chopra as Raj (2001) * Om Puri as Sunder alias ACP Jose Santos in episode "The Case of the Counterfeit Cop".(2001) * Sanjay Mishra as Rajesh (2001) * Kashmera Shah as Kinneri (2001) * Milind Gunaji as Johnny (2001) * Sarita Joshi as Advocate Suhasini (2001) * Sanjay Batra as Vinay (2001) * Mushtaq Khan as Bacchu (2001) * Madhukar Toradmal as Business man Gupta, victim's father * Dinesh Hingoo as Builder Chunnilal (2001) * Gufi Paintal as Chander (2001) * Viju Khote as Judge (2002), Deaf man (2006) * Bhagyashree as Nupur (2001) * Shishir Sharma as Kumar, Arjun (1998), Shailesh (1998) * Arif Zakaria as Chandan (2002) * Deepak Qazir as Taxi Driver (2000) * Kapil Dev as himself in episode "Howzzat?" (2003) * Sudhir as Dr Kailash / Jinjaar/ Mr. Eliott (2003) * Ananya Khare as Shilpa (2002), Sunita (2004) * Rajesh Khattar as Pramod (2000), Rajesh (2006) * Bhairavi Raichura as Reshma (2005) * Abhijeet Sawant as himself (2005) * Sadashiv Amrapurkar as Subbu (2005) * Baba Sehgal as himself (2006) * Mandira Bedi as Reshma (2001), Saagrika (2005) * Bharat Kapoor as Sudhakar (1998) and Intelligence Officer Raman Kapoor (2002) * Kunika as Rakhi (2001) * Rajiv Paul as Jeevan (2000) * Murli Sharma as Giri (2000), Govinda(2005), Contract killer(2006), Dr O (2007) * Shahbaz Khan as Karan (2006), Don (2007) * Paintal as mute man (2006) * Lilliput as Blind Man (2006) * Deepshika Nagpal as Lavanya Daneka a Tarot Card Reader Ep: Maut Ka Saudagar, Vyoma, Sudeep's Wife, Ep430:The Invisible Eye Witness (2006) * Shilpa Shinde as Sheetal in "The Case of Mysterious Shadows" (2006) * Vishal Kotian as RJ Sunny (2006) * Melissa Pais as Alice in episode: Murder in FM 97.1 (2006) * Mihir Mishra as KeniRaj in "Body in the Suitcase". (2006) * Dalljeit Kaur as Reshma/Neha E in "Body in the Suitcase" (2006), Sreeja in "The Invisible Eye Witness". (2006) * Narayani Shastri as Sunanda, Abhijeet's Friend Parthav's Wofer in "he Mysterious Gift". (2006) * Salman Khan as himself (2009) Khooni Piracy Racket in (Episode 583) and (2014) Salman Ki Kick in (Episode 1107 and 1108) * R. Madhavan as himself (2009) Mystery Code Murders in (Episode 556) * Avantika Shetty as Mansi(2009) in Students Mass Murder, as Ruhi(2009) in Bhoola bhutka * Sajid Khan as himself (2009) * Mahek Chahal as herself (2009) * Rituraj Singh as Deven, Hiten (2009) * Inder Kumar as himself (2009) * Sarfaraz Khan as himself (2009) * Yami Gautam as Ananya (2010) (episode 642, "Girl in Coffin") * Lavanya Tripathi as Sakshi in the case 'Maut ka Ashirvad' (Episode 619) (2010) * Nikhil Guharoy as Vijay (2009), Aman (2009), Anuj (2010), Sid (2011), Nitin (2011), Kunal (2012), Rishi (2013), Dr. Harshit (2013), Arun (2013), Hardik (2014), Sarthak, Randhir, Sundar and Vikram. He also appeared in "Maut ka Ashirwad" (2010) and "Aakhri Chunauti" (2010) as Sub-Inspector Kajal's brother Rahul Kumar. * Mahesh Manjrekar as H.D. (Harpez Dongara) (2010) He acted as a dangerous criminal who kidnapped all the CID officers and forensic experts and left India. Later in episode 664 Abhijeet shot him and he died. * Dino Morea as Nitin (2010), himself (2011) * Emraan Hashmi as himself (2010), Director Abraham (2011) and Raghuram "Raghu" Rathore aka Mr. X (2015). * Sonalika Prasad as Sheela in "Jhagdalu Aurat" (2015). * Prachi Desai as herself (2010). * Ronit Roy as K.D Pathak from ''Adaalat'' (2010, 2012, 2014) * Rani Mukerji as herself (2011) * Shaji Choudhary as Gangster (2003), Trilok (2008), Heera (2009), Nibo, Goga (2011), Shera, Vikram, Mewaram (2012) * Aamir Khan as Senior Inspector Surjan Singh Shekhawat (2012) * Kareena Kapoor Khan as herself (2012) * Akshay Kumar as Shiva (2012) and as Rowdy Rathore (2012). * Sonakshi Sinha as Paro (2012), herself (2013) * Imran Khan as himself (2013) * Akanksha Puri as Nandita Menon (2015) * Sunny Deol as Saranjeet Singh Talwar aka Singh Saab (2013) and Ajay Mehra (2016) * Chandan Madan as Akhil/Tez/Sumeet/Samrat/Manav/Sameer (2011–2018) * Dilip Joshi as Jethalal Champaklal Gada from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Disha Vakani as Daya Jethalal Gada from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Gurucharan Singh as Roshan Singh Harjeet Singh Sodhi from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Shyam Pathak as Patrakaar Popatlal from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Munmun Dutta as Babita Krishnan Iyer from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Mandar Chandwadkar as Aatmaram Tukaram Bhide from ''Taarak Mehta Ka Ooltah Chashmah'' (2014) * Jimmy Sheirgill as Vishnu Sharma (2014) * Anu Malik as himself (2014) * Jas Arora as Sunny / Pathan * Jackky Bhagnani as Abhimanyu Kaul (2014) * Govinda as Armaan (2014) * Saif Ali Khan as Yudi Jaitely (2014) * Tusshar Kapoor as Vikash Singh (2014) * Shraddha Kapoor as herself (Episode 1094) (2014) * Sidharth Malhotra as himself (Episode 1094) (2014) * Sunny Leone as Ragini (2014) * Thakur Anoop Singh as Daya (2014) in episode: Daya v/s Daya * Varun Dhawan as himself (2015) in episode : ''Varun Dhawan Khatre Mein'' * Shah Rukh Khan as himself (2015) * Sushant Singh Rajput as Byomkesh Bakshi (2015) * Anand Tiwari as Ajit Kumar Bandhopadhyay (2015) * Diganth as himself (episode 1288) (2015) * Karan Grover as himself (episode 1288) (2015) * Anushka Ranjan as herself (episode 1288) (2015) * Rahul Dev as Katori Damta. He played the negative role in ''Karo Ya Maro'' story arc. (2016) * Gauri Tonk as Dolly Harpez Dongara, wife of Harpez Dongara taking revenge from Abhijeet for Harpez's death in the ''Karo Ya Maro'' story arc. (2016) * Abbas–Mustan as themselves (2017) * Kiara Advani as herself (2017) * Tigmanshu Dhulia as Barbosa, Leader of The Eye Gang (2018) 339fc1efa5edf2c453427dc364344d2da23a4ad2 Dholavira 0 28 36 2024-03-15T16:45:34Z 80.5.18.102 0 Created page with "'''Dholavira''' (Gujarati: ધોળાવીરા) is an archaeological site at Khadirbet in Bhachau Taluka of Kutch District, in the state of Gujarat in western India, which has taken its name from a modern-day village 1 kilometre (0.62 mi) south of it. This village is 165 km (103 mi) from Radhanpur. Also known locally as ''Kotada timba'', the site contains ruins of a city of the ancient Indus Valley civilization. Earthquakes have repeatedly affected Dholavira, includ..." wikitext text/x-wiki '''Dholavira''' (Gujarati: ધોળાવીરા) is an archaeological site at Khadirbet in Bhachau Taluka of Kutch District, in the state of Gujarat in western India, which has taken its name from a modern-day village 1 kilometre (0.62 mi) south of it. This village is 165 km (103 mi) from Radhanpur. Also known locally as ''Kotada timba'', the site contains ruins of a city of the ancient Indus Valley civilization. Earthquakes have repeatedly affected Dholavira, including a particularly severe one around 2600 BC. Dholavira's location is on the Tropic of Cancer. It is one of the five largest Harappan sites and the most prominent of archaeological sites in India belonging to the Indus Valley Civilization. It is located on ''Khadir bet'' island in the Kutch Desert Wildlife Sanctuary in the Great Rann of Kutch. The 47 ha (120 acres) quadrangular city lay between two seasonal streams, the Mansar in the north and Manhar in the south. The site was thought to be occupied from c.2650 BCE, declining slowly after about 2100 BCE, and to have been briefly abandoned then reoccupied until c.1450 BCE; however, recent research suggests the beginning of occupation around 3500 BCE (pre-Harappan) and continuity until around 1800 BCE (early part of Late Harappan period). The site was initially discovered by a resident of Dholavira village, Shambhudan Gadhvi, in early 1960s who made efforts to bring government attention to the location. The site was "officially" discovered in 1967-68 by J. P. Joshi, of the Archaeological Survey of India (ASI), and is the fifth largest of eight major Harappan sites. It has been under excavation since 1990 by the ASI, which opined that "Dholavira has indeed added new dimensions to personality of Indus Valley Civilisation." The other major Harappan sites discovered so far are Harappa, Mohenjo-daro, Ganeriwala, Rakhigarhi, Kalibangan, Rupnagar and Lothal. It was named as a UNESCO World Heritage Site under the name ''Dholavira: a Harappan City'' on 27 July 2021. == hronology of Dholavira == Ravindra Singh Bisht, the director of the Dholavira excavations, has defined the following seven stages of occupation at the site: {| class="wikitable" !STAGES !DATES !EVENTS |- |Stage I |2650–2550 BCE |Early Harappan – Mature Harappan Transition A |- |Stage II |2550–2500 BCE |Early Harappan – Mature Harappan Transition B |- |Stage III |2500–2200 BCE |Mature Harappan A |- |Stage IV |2200–2000 BCE |Mature Harappan B |- |Stage V |2000–1900 BCE |Mature Harappan C |- | |1900–1850 BCE |Period of desertion |- |Stage VI |1850–1750 BCE |Posturban Harappan A |- | |1750–1650 BCE |Period of desertion |- |Stage VII |1650–1450 BCE |Posturban Harappan B |} Recent C14 datings and stylistic comparisons with Amri II-B period pottery show the first two phases should be termed '''Pre-Harappan Dholaviran Culture''' and re-dated as follows: '''Stage I''' (c. 3500-3200 BCE), and '''Stage II''' (c. 3200-2600 BCE). == Excavations == The excavation was initiated in 1989 by the ASI under the direction of Bisht, and there were 13 field excavations between 1990 and 2005. The excavation brought to light urban planning and architecture, and unearthed large numbers of antiquities such as animal bones, gold, silver, terracotta ornaments, pottery and bronze vessels. Archaeologists believe<sup>[''vague'']</sup> that Dholavira was an important centre of trade between settlements in south Gujarat, Sindh and Punjab and Western Asia. == Architecture and material culture == See also: Periodisation of IVC, Pottery culture in Indian subcontinent, Phases in archaeology, and Chronological dating Estimated to be older than the port-city of Lothal, the city of Dholavira has a rectangular shape and organization, and is spread over 22 ha (54 acres). The area measures 771.1 m (2,530 ft) in length, and 616.85 m (2,023.8 ft) in width. Unlike Harappa and Mohenjo-daro, the city was constructed to a pre-existing geometrical plan consisting of three divisions – the citadel, the middle town, and the lower town. The acropolis and the middle town had been furnished with their own defence-work, gateways, built-up areas, street system, wells, and large open spaces. The acropolis is the most thoroughly fortified and complex area in the city, of which it appropriates the major portion of the southwestern zone. The towering "castle" stands is defended by double ramparts. Next to this stands a place called the 'bailey' where important officials lived. The city within the general fortifications accounts for 48 ha (120 acres). There are extensive structure-bearing areas which are outside yet integral to the fortified settlement. Beyond the walls, another settlement has been found. The most striking feature of the city is that all of its buildings, at least in their present state of preservation, are built of stone, whereas most other Harappan sites, including Harappa itself and Mohenjo-Daro, are almost exclusively built of brick. Dholavira is flanked by two storm water channels; the Mansar in the north, and the Manhar in the south. In the town square, there is an area high above the ground, called the "Citadel<nowiki>''</nowiki>. === Reservoirs === Bisht, who retired as the Joint Director-General of the ASI, said, "The kind of efficient system of Harappans of Dholavira, developed for conservation, harvesting and storage of water speaks eloquently about their advanced hydraulic engineering, given the state of technology in the third millennium BCE." One of the unique features of Dholavira is the sophisticated water conservation system of channels and reservoirs, the earliest found anywhere in the world, built completely of stone. The city had massive reservoirs, three of which are exposed. They were used for storing fresh water brought by rains or to store water diverted from two nearby rivulets. This clearly came in response to the desert climate and conditions of Kutch, where several years may pass without rainfall. A seasonal stream which runs in a north–south direction near the site was dammed at several points to collect water. In 1998, another reservoir was discovered in the site. The inhabitants of Dholavira created sixteen or more reservoirs of varying size during Stage III. Some of these took advantage of the slope of the ground within the large settlement, a drop of 13 metres (43 ft) from northeast to northwest. Other reservoirs were excavated, some into living rock. Recent work has revealed two large reservoirs, one to the east of the castle and one to its south, near the Annexe. The reservoirs are cut through stone vertically, and are about 7 m (23 ft) deep and 79 m (259 ft) long. They skirt the city, while the citadel and bath are centrally located on raised ground. There is also a large well with a stone-cut trough connecting it to a drain meant for conducting water to a storage tank. The bathing tank had steps descending inwards. In October 2014, excavation began on a rectangular stepwell which measured 73.4 m (241 ft) long, 29.3 m (96 ft) wide, and 10 m (33 ft) deep, making it three times bigger than the Great Bath of Mohenjedaro. === Seal making === Some of the seals found at Dholavira, belonging to Stage III, contained animal only figures, without any type of script. It is suggested<sup>[''by whom?'']</sup> that these type of seals represent early conventions of Indus seal making. === Other structures and objects === A huge circular structure on the site is believed to be a grave or memorial, although it contained no skeletons or other human remains. The structure consists of ten radial mud-brick walls built in the shape of a spoked wheel. A soft sandstone sculpture of a male with phallus erectus but head and feet below ankle truncated was found in the passageway of the eastern gate. Many funerary structures have been found (although all but one were devoid of skeletons), as well as pottery pieces, terra cotta seals, bangles, rings, beads, and intaglio engravings. === Hemispherical constructions === Seven hemispherical constructions were found at Dholavira, of which two were excavated in detail, which were constructed over large rock cut chambers. Having a circular plan, these were big hemispherical elevated mud brick constructions. One of the excavated structures was designed in the form of a spoked wheel. The other was also designed in same fashion, but as a wheel without spokes. Although they contained burial goods of pottery, no skeletons were found except for one grave, where a skeleton and a copper mirror were found. A necklace of steatite beads strung to a copper wire with hooks at both ends, a gold bangle, gold and other beads were also found in one of the hemispherical structures. The Archaeological Survey of India, which conducted the excavation, opines that these “hemispherical structures remind one of early Buddhist stupas.” and that "the kind of design that is of spoked wheel and unspoked wheel also remind one of the Sararata-chakra-citi and sapradhi-rata-chakra-citi mentioned in the Satapatha Brahmana and Shulba Sutrass". == Findings == Painted Indus black-on-red-ware pottery, square stamp seals, seals without Indus script, a huge signboard measuring about 3 m (9.8 ft) in length, containing ten letters of Indus script. One poorly preserved seated male figure made of stone has also been found, comparable to high quality two stone sculptures found at Harappa. Large black-slipped jars with pointed base were also found at this site. A giant bronze hammer, a big chisel, a bronze hand-held mirror, a gold wire, gold ear stud, gold globules with holes, copper celts and bangles, shell bangles, phallus-like symbols of stone, square seals with Indus inscription and signs, a circular seal, humped animals, pottery with painted motifs, goblets, dish-on-stand, perforated jars, Terracotta tumblers in good shape, architectural members made of ballast stones, grinding stones, mortars, etc., were also found at this site. Stone weights of different measures were also found. == Coastal route == It is suggested that a coastal route existed linking Lothal and Dholavira to Sutkagan Dor on the Makran coast. == Language and script == The Harappans spoke an unknown language and their script has not yet been deciphered. It is believed to have had about 400 basic signs, with many variations. The signs may have stood both for words and for syllables. The direction of the writing was generally from right-to-left. Most of the inscriptions are found on seals (mostly made out of stone) and sealings (pieces of clay on which the seal was pressed down to leave its impression). Some inscriptions are also found on copper tablets, bronze implements, and small objects made of terracotta, stone and faience. The seals may have been used in trade and also for official administrative work. A lot of inscribed material was found at Mohenjo-daro and other Indus Valley Civilisation sites. === Sign board === The most significant discoveries at Dholavira were made in one of the side rooms of the northern gateway of the city, and is generally known as the Dholavira Signboard. The Harappans had arranged and set pieces of the mineral gypsum to form ten large symbols or letters on a big wooden board. At some point, the board fell flat on its face. The wood decayed, but the arrangement of the letters survived. The letters of the signboard are comparable to large bricks that were used in nearby walls. Each sign is about 37 cm (15 in) high and the board on which letters were inscribed was about 3 m (9.8 ft) long. The inscription is one of the longest in the Indus script, with one of the symbols appearing four times, and this and its large size and public nature make it a key piece of evidence cited by scholars arguing that the Indus script represents full literacy. A four sign inscription with large letters on sandstone is also found at this site, considered first of such inscription on sandstone at any of Harappan sites. 1748a57a9700439e3b5eb8800c7b63e4308d9138 37 36 2024-03-15T16:47:00Z 80.5.18.102 0 wikitext text/x-wiki '''Dholavira''' ([[Gujarati]]: ધોળાવીરા) is an archaeological site at Khadirbet in Bhachau Taluka of Kutch District, in the state of Gujarat in western India, which has taken its name from a modern-day village 1 kilometre (0.62 mi) south of it. This village is 165 km (103 mi) from Radhanpur. Also known locally as ''Kotada timba'', the site contains ruins of a city of the ancient Indus Valley civilization. Earthquakes have repeatedly affected Dholavira, including a particularly severe one around 2600 BC. Dholavira's location is on the Tropic of Cancer. It is one of the five largest Harappan sites and the most prominent of archaeological sites in India belonging to the Indus Valley Civilization. It is located on ''Khadir bet'' island in the Kutch Desert Wildlife Sanctuary in the Great Rann of Kutch. The 47 ha (120 acres) quadrangular city lay between two seasonal streams, the Mansar in the north and Manhar in the south. The site was thought to be occupied from c.2650 BCE, declining slowly after about 2100 BCE, and to have been briefly abandoned then reoccupied until c.1450 BCE; however, recent research suggests the beginning of occupation around 3500 BCE (pre-Harappan) and continuity until around 1800 BCE (early part of Late Harappan period). The site was initially discovered by a resident of Dholavira village, Shambhudan Gadhvi, in early 1960s who made efforts to bring government attention to the location. The site was "officially" discovered in 1967-68 by J. P. Joshi, of the Archaeological Survey of India (ASI), and is the fifth largest of eight major Harappan sites. It has been under excavation since 1990 by the ASI, which opined that "Dholavira has indeed added new dimensions to personality of Indus Valley Civilisation." The other major Harappan sites discovered so far are Harappa, Mohenjo-daro, Ganeriwala, Rakhigarhi, Kalibangan, Rupnagar and Lothal. It was named as a UNESCO World Heritage Site under the name ''Dholavira: a Harappan City'' on 27 July 2021. == hronology of Dholavira == Ravindra Singh Bisht, the director of the Dholavira excavations, has defined the following seven stages of occupation at the site: {| class="wikitable" !STAGES !DATES !EVENTS |- |Stage I |2650–2550 BCE |Early Harappan – Mature Harappan Transition A |- |Stage II |2550–2500 BCE |Early Harappan – Mature Harappan Transition B |- |Stage III |2500–2200 BCE |Mature Harappan A |- |Stage IV |2200–2000 BCE |Mature Harappan B |- |Stage V |2000–1900 BCE |Mature Harappan C |- | |1900–1850 BCE |Period of desertion |- |Stage VI |1850–1750 BCE |Posturban Harappan A |- | |1750–1650 BCE |Period of desertion |- |Stage VII |1650–1450 BCE |Posturban Harappan B |} Recent C14 datings and stylistic comparisons with Amri II-B period pottery show the first two phases should be termed '''Pre-Harappan Dholaviran Culture''' and re-dated as follows: '''Stage I''' (c. 3500-3200 BCE), and '''Stage II''' (c. 3200-2600 BCE). == Excavations == The excavation was initiated in 1989 by the ASI under the direction of Bisht, and there were 13 field excavations between 1990 and 2005. The excavation brought to light urban planning and architecture, and unearthed large numbers of antiquities such as animal bones, gold, silver, terracotta ornaments, pottery and bronze vessels. Archaeologists believe<sup>[''vague'']</sup> that Dholavira was an important centre of trade between settlements in south Gujarat, Sindh and Punjab and Western Asia. == Architecture and material culture == See also: Periodisation of IVC, Pottery culture in Indian subcontinent, Phases in archaeology, and Chronological dating Estimated to be older than the port-city of Lothal, the city of Dholavira has a rectangular shape and organization, and is spread over 22 ha (54 acres). The area measures 771.1 m (2,530 ft) in length, and 616.85 m (2,023.8 ft) in width. Unlike Harappa and Mohenjo-daro, the city was constructed to a pre-existing geometrical plan consisting of three divisions – the citadel, the middle town, and the lower town. The acropolis and the middle town had been furnished with their own defence-work, gateways, built-up areas, street system, wells, and large open spaces. The acropolis is the most thoroughly fortified and complex area in the city, of which it appropriates the major portion of the southwestern zone. The towering "castle" stands is defended by double ramparts. Next to this stands a place called the 'bailey' where important officials lived. The city within the general fortifications accounts for 48 ha (120 acres). There are extensive structure-bearing areas which are outside yet integral to the fortified settlement. Beyond the walls, another settlement has been found. The most striking feature of the city is that all of its buildings, at least in their present state of preservation, are built of stone, whereas most other Harappan sites, including Harappa itself and Mohenjo-Daro, are almost exclusively built of brick. Dholavira is flanked by two storm water channels; the Mansar in the north, and the Manhar in the south. In the town square, there is an area high above the ground, called the "Citadel<nowiki>''</nowiki>. === Reservoirs === Bisht, who retired as the Joint Director-General of the ASI, said, "The kind of efficient system of Harappans of Dholavira, developed for conservation, harvesting and storage of water speaks eloquently about their advanced hydraulic engineering, given the state of technology in the third millennium BCE." One of the unique features of Dholavira is the sophisticated water conservation system of channels and reservoirs, the earliest found anywhere in the world, built completely of stone. The city had massive reservoirs, three of which are exposed. They were used for storing fresh water brought by rains or to store water diverted from two nearby rivulets. This clearly came in response to the desert climate and conditions of Kutch, where several years may pass without rainfall. A seasonal stream which runs in a north–south direction near the site was dammed at several points to collect water. In 1998, another reservoir was discovered in the site. The inhabitants of Dholavira created sixteen or more reservoirs of varying size during Stage III. Some of these took advantage of the slope of the ground within the large settlement, a drop of 13 metres (43 ft) from northeast to northwest. Other reservoirs were excavated, some into living rock. Recent work has revealed two large reservoirs, one to the east of the castle and one to its south, near the Annexe. The reservoirs are cut through stone vertically, and are about 7 m (23 ft) deep and 79 m (259 ft) long. They skirt the city, while the citadel and bath are centrally located on raised ground. There is also a large well with a stone-cut trough connecting it to a drain meant for conducting water to a storage tank. The bathing tank had steps descending inwards. In October 2014, excavation began on a rectangular stepwell which measured 73.4 m (241 ft) long, 29.3 m (96 ft) wide, and 10 m (33 ft) deep, making it three times bigger than the Great Bath of Mohenjedaro. === Seal making === Some of the seals found at Dholavira, belonging to Stage III, contained animal only figures, without any type of script. It is suggested<sup>[''by whom?'']</sup> that these type of seals represent early conventions of Indus seal making. === Other structures and objects === A huge circular structure on the site is believed to be a grave or memorial, although it contained no skeletons or other human remains. The structure consists of ten radial mud-brick walls built in the shape of a spoked wheel. A soft sandstone sculpture of a male with phallus erectus but head and feet below ankle truncated was found in the passageway of the eastern gate. Many funerary structures have been found (although all but one were devoid of skeletons), as well as pottery pieces, terra cotta seals, bangles, rings, beads, and intaglio engravings. === Hemispherical constructions === Seven hemispherical constructions were found at Dholavira, of which two were excavated in detail, which were constructed over large rock cut chambers. Having a circular plan, these were big hemispherical elevated mud brick constructions. One of the excavated structures was designed in the form of a spoked wheel. The other was also designed in same fashion, but as a wheel without spokes. Although they contained burial goods of pottery, no skeletons were found except for one grave, where a skeleton and a copper mirror were found. A necklace of steatite beads strung to a copper wire with hooks at both ends, a gold bangle, gold and other beads were also found in one of the hemispherical structures. The Archaeological Survey of India, which conducted the excavation, opines that these “hemispherical structures remind one of early Buddhist stupas.” and that "the kind of design that is of spoked wheel and unspoked wheel also remind one of the Sararata-chakra-citi and sapradhi-rata-chakra-citi mentioned in the Satapatha Brahmana and Shulba Sutrass". == Findings == Painted Indus black-on-red-ware pottery, square stamp seals, seals without Indus script, a huge signboard measuring about 3 m (9.8 ft) in length, containing ten letters of Indus script. One poorly preserved seated male figure made of stone has also been found, comparable to high quality two stone sculptures found at Harappa. Large black-slipped jars with pointed base were also found at this site. A giant bronze hammer, a big chisel, a bronze hand-held mirror, a gold wire, gold ear stud, gold globules with holes, copper celts and bangles, shell bangles, phallus-like symbols of stone, square seals with Indus inscription and signs, a circular seal, humped animals, pottery with painted motifs, goblets, dish-on-stand, perforated jars, Terracotta tumblers in good shape, architectural members made of ballast stones, grinding stones, mortars, etc., were also found at this site. Stone weights of different measures were also found. == Coastal route == It is suggested that a coastal route existed linking Lothal and Dholavira to Sutkagan Dor on the Makran coast. == Language and script == The Harappans spoke an unknown language and their script has not yet been deciphered. It is believed to have had about 400 basic signs, with many variations. The signs may have stood both for words and for syllables. The direction of the writing was generally from right-to-left. Most of the inscriptions are found on seals (mostly made out of stone) and sealings (pieces of clay on which the seal was pressed down to leave its impression). Some inscriptions are also found on copper tablets, bronze implements, and small objects made of terracotta, stone and faience. The seals may have been used in trade and also for official administrative work. A lot of inscribed material was found at Mohenjo-daro and other Indus Valley Civilisation sites. === Sign board === The most significant discoveries at Dholavira were made in one of the side rooms of the northern gateway of the city, and is generally known as the Dholavira Signboard. The Harappans had arranged and set pieces of the mineral gypsum to form ten large symbols or letters on a big wooden board. At some point, the board fell flat on its face. The wood decayed, but the arrangement of the letters survived. The letters of the signboard are comparable to large bricks that were used in nearby walls. Each sign is about 37 cm (15 in) high and the board on which letters were inscribed was about 3 m (9.8 ft) long. The inscription is one of the longest in the Indus script, with one of the symbols appearing four times, and this and its large size and public nature make it a key piece of evidence cited by scholars arguing that the Indus script represents full literacy. A four sign inscription with large letters on sandstone is also found at this site, considered first of such inscription on sandstone at any of Harappan sites. bbf24c2b2b3326cfa836988b750f35bf082a94ac 38 37 2024-03-15T16:47:25Z 80.5.18.102 0 wikitext text/x-wiki '''Dholavira''' ([[Gujarati]]: ધોળાવીરા) is an archaeological site at Khadirbet in Bhachau Taluka of Kutch District, in the state of Gujarat in western India, which has taken its name from a modern-day village 1 kilometre (0.62 mi) south of it. This village is 165 km (103 mi) from Radhanpur. Also known locally as ''Kotada timba'', the site contains ruins of a city of the ancient Indus Valley civilization. Earthquakes have repeatedly affected Dholavira, including a particularly severe one around 2600 BC. Dholavira's location is on the Tropic of Cancer. It is one of the five largest Harappan sites and the most prominent of archaeological sites in India belonging to the Indus Valley Civilization. It is located on ''Khadir bet'' island in the Kutch Desert Wildlife Sanctuary in the Great Rann of Kutch. The 47 ha (120 acres) quadrangular city lay between two seasonal streams, the Mansar in the north and Manhar in the south. The site was thought to be occupied from c.2650 BCE, declining slowly after about 2100 BCE, and to have been briefly abandoned then reoccupied until c.1450 BCE; however, recent research suggests the beginning of occupation around 3500 BCE (pre-Harappan) and continuity until around 1800 BCE (early part of Late Harappan period). The site was initially discovered by a resident of Dholavira village, Shambhudan Gadhvi, in early 1960s who made efforts to bring government attention to the location. The site was "officially" discovered in 1967-68 by J. P. Joshi, of the Archaeological Survey of India (ASI), and is the fifth largest of eight major Harappan sites. It has been under excavation since 1990 by the ASI, which opined that "Dholavira has indeed added new dimensions to personality of Indus Valley Civilisation." The other major Harappan sites discovered so far are Harappa, Mohenjo-daro, Ganeriwala, Rakhigarhi, Kalibangan, Rupnagar and Lothal. It was named as a UNESCO World Heritage Site under the name ''Dholavira: a Harappan City'' on 27 July 2021. == Chronology of Dholavira == Ravindra Singh Bisht, the director of the Dholavira excavations, has defined the following seven stages of occupation at the site: {| class="wikitable" !STAGES !DATES !EVENTS |- |Stage I |2650–2550 BCE |Early Harappan – Mature Harappan Transition A |- |Stage II |2550–2500 BCE |Early Harappan – Mature Harappan Transition B |- |Stage III |2500–2200 BCE |Mature Harappan A |- |Stage IV |2200–2000 BCE |Mature Harappan B |- |Stage V |2000–1900 BCE |Mature Harappan C |- | |1900–1850 BCE |Period of desertion |- |Stage VI |1850–1750 BCE |Posturban Harappan A |- | |1750–1650 BCE |Period of desertion |- |Stage VII |1650–1450 BCE |Posturban Harappan B |} Recent C14 datings and stylistic comparisons with Amri II-B period pottery show the first two phases should be termed '''Pre-Harappan Dholaviran Culture''' and re-dated as follows: '''Stage I''' (c. 3500-3200 BCE), and '''Stage II''' (c. 3200-2600 BCE). == Excavations == The excavation was initiated in 1989 by the ASI under the direction of Bisht, and there were 13 field excavations between 1990 and 2005. The excavation brought to light urban planning and architecture, and unearthed large numbers of antiquities such as animal bones, gold, silver, terracotta ornaments, pottery and bronze vessels. Archaeologists believe<sup>[''vague'']</sup> that Dholavira was an important centre of trade between settlements in south Gujarat, Sindh and Punjab and Western Asia. == Architecture and material culture == See also: Periodisation of IVC, Pottery culture in Indian subcontinent, Phases in archaeology, and Chronological dating Estimated to be older than the port-city of Lothal, the city of Dholavira has a rectangular shape and organization, and is spread over 22 ha (54 acres). The area measures 771.1 m (2,530 ft) in length, and 616.85 m (2,023.8 ft) in width. Unlike Harappa and Mohenjo-daro, the city was constructed to a pre-existing geometrical plan consisting of three divisions – the citadel, the middle town, and the lower town. The acropolis and the middle town had been furnished with their own defence-work, gateways, built-up areas, street system, wells, and large open spaces. The acropolis is the most thoroughly fortified and complex area in the city, of which it appropriates the major portion of the southwestern zone. The towering "castle" stands is defended by double ramparts. Next to this stands a place called the 'bailey' where important officials lived. The city within the general fortifications accounts for 48 ha (120 acres). There are extensive structure-bearing areas which are outside yet integral to the fortified settlement. Beyond the walls, another settlement has been found. The most striking feature of the city is that all of its buildings, at least in their present state of preservation, are built of stone, whereas most other Harappan sites, including Harappa itself and Mohenjo-Daro, are almost exclusively built of brick. Dholavira is flanked by two storm water channels; the Mansar in the north, and the Manhar in the south. In the town square, there is an area high above the ground, called the "Citadel<nowiki>''</nowiki>. === Reservoirs === Bisht, who retired as the Joint Director-General of the ASI, said, "The kind of efficient system of Harappans of Dholavira, developed for conservation, harvesting and storage of water speaks eloquently about their advanced hydraulic engineering, given the state of technology in the third millennium BCE." One of the unique features of Dholavira is the sophisticated water conservation system of channels and reservoirs, the earliest found anywhere in the world, built completely of stone. The city had massive reservoirs, three of which are exposed. They were used for storing fresh water brought by rains or to store water diverted from two nearby rivulets. This clearly came in response to the desert climate and conditions of Kutch, where several years may pass without rainfall. A seasonal stream which runs in a north–south direction near the site was dammed at several points to collect water. In 1998, another reservoir was discovered in the site. The inhabitants of Dholavira created sixteen or more reservoirs of varying size during Stage III. Some of these took advantage of the slope of the ground within the large settlement, a drop of 13 metres (43 ft) from northeast to northwest. Other reservoirs were excavated, some into living rock. Recent work has revealed two large reservoirs, one to the east of the castle and one to its south, near the Annexe. The reservoirs are cut through stone vertically, and are about 7 m (23 ft) deep and 79 m (259 ft) long. They skirt the city, while the citadel and bath are centrally located on raised ground. There is also a large well with a stone-cut trough connecting it to a drain meant for conducting water to a storage tank. The bathing tank had steps descending inwards. In October 2014, excavation began on a rectangular stepwell which measured 73.4 m (241 ft) long, 29.3 m (96 ft) wide, and 10 m (33 ft) deep, making it three times bigger than the Great Bath of Mohenjedaro. === Seal making === Some of the seals found at Dholavira, belonging to Stage III, contained animal only figures, without any type of script. It is suggested<sup>[''by whom?'']</sup> that these type of seals represent early conventions of Indus seal making. === Other structures and objects === A huge circular structure on the site is believed to be a grave or memorial, although it contained no skeletons or other human remains. The structure consists of ten radial mud-brick walls built in the shape of a spoked wheel. A soft sandstone sculpture of a male with phallus erectus but head and feet below ankle truncated was found in the passageway of the eastern gate. Many funerary structures have been found (although all but one were devoid of skeletons), as well as pottery pieces, terra cotta seals, bangles, rings, beads, and intaglio engravings. === Hemispherical constructions === Seven hemispherical constructions were found at Dholavira, of which two were excavated in detail, which were constructed over large rock cut chambers. Having a circular plan, these were big hemispherical elevated mud brick constructions. One of the excavated structures was designed in the form of a spoked wheel. The other was also designed in same fashion, but as a wheel without spokes. Although they contained burial goods of pottery, no skeletons were found except for one grave, where a skeleton and a copper mirror were found. A necklace of steatite beads strung to a copper wire with hooks at both ends, a gold bangle, gold and other beads were also found in one of the hemispherical structures. The Archaeological Survey of India, which conducted the excavation, opines that these “hemispherical structures remind one of early Buddhist stupas.” and that "the kind of design that is of spoked wheel and unspoked wheel also remind one of the Sararata-chakra-citi and sapradhi-rata-chakra-citi mentioned in the Satapatha Brahmana and Shulba Sutrass". == Findings == Painted Indus black-on-red-ware pottery, square stamp seals, seals without Indus script, a huge signboard measuring about 3 m (9.8 ft) in length, containing ten letters of Indus script. One poorly preserved seated male figure made of stone has also been found, comparable to high quality two stone sculptures found at Harappa. Large black-slipped jars with pointed base were also found at this site. A giant bronze hammer, a big chisel, a bronze hand-held mirror, a gold wire, gold ear stud, gold globules with holes, copper celts and bangles, shell bangles, phallus-like symbols of stone, square seals with Indus inscription and signs, a circular seal, humped animals, pottery with painted motifs, goblets, dish-on-stand, perforated jars, Terracotta tumblers in good shape, architectural members made of ballast stones, grinding stones, mortars, etc., were also found at this site. Stone weights of different measures were also found. == Coastal route == It is suggested that a coastal route existed linking Lothal and Dholavira to Sutkagan Dor on the Makran coast. == Language and script == The Harappans spoke an unknown language and their script has not yet been deciphered. It is believed to have had about 400 basic signs, with many variations. The signs may have stood both for words and for syllables. The direction of the writing was generally from right-to-left. Most of the inscriptions are found on seals (mostly made out of stone) and sealings (pieces of clay on which the seal was pressed down to leave its impression). Some inscriptions are also found on copper tablets, bronze implements, and small objects made of terracotta, stone and faience. The seals may have been used in trade and also for official administrative work. A lot of inscribed material was found at Mohenjo-daro and other Indus Valley Civilisation sites. === Sign board === The most significant discoveries at Dholavira were made in one of the side rooms of the northern gateway of the city, and is generally known as the Dholavira Signboard. The Harappans had arranged and set pieces of the mineral gypsum to form ten large symbols or letters on a big wooden board. At some point, the board fell flat on its face. The wood decayed, but the arrangement of the letters survived. The letters of the signboard are comparable to large bricks that were used in nearby walls. Each sign is about 37 cm (15 in) high and the board on which letters were inscribed was about 3 m (9.8 ft) long. The inscription is one of the longest in the Indus script, with one of the symbols appearing four times, and this and its large size and public nature make it a key piece of evidence cited by scholars arguing that the Indus script represents full literacy. A four sign inscription with large letters on sandstone is also found at this site, considered first of such inscription on sandstone at any of Harappan sites. 54d980772e28a5365183b32fb2267a2d5a48b4b5 Crime Branch 0 29 39 2024-03-16T10:35:14Z Motzoid India 2 Redirected page to [[Criminal Investigations Department#India]] wikitext text/x-wiki #REDIRECT [[Criminal Investigations Department #India]] 21e4e49faadfa388c5e58d6e425bd2e8dc284305 Template:Infobox person 10 387 781 780 2024-03-16T10:46:11Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:infobox|infoboxTemplate|child={{{child|{{{embed|}}}}}} | bodyclass = biography vcard | above = {{Br separated entries | 1 = {{#if:{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal; display:inline-block;">{{{honorific prefix|{{{honorific_prefix|{{{honorific-prefix|{{{pre-nominals|}}}}}}}}}}}}</div>}} | 2 = <div class="fn" style="display:inline-block">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}</div> | 3 = {{#if:{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal; display:inline-block;">{{{honorific suffix|{{{honorific_suffix|{{{honorific-suffix|{{{post-nominals|}}}}}}}}}}}}</div>}} }} | abovestyle = font-size:125%; {{{abovestyle|}}} | subheaderstyle = font-size:125%; font-weight:bold; | subheader = {{#switch:{{{child|{{{embed|}}}}}}|yes=<!--empty when this infobox is embedded-->|#default={{#if:{{{native_name|}}}|{{#if:{{{native_name_lang|}}}|<div class="nickname" lang="{{{native_name_lang}}}">}}{{{native_name}}}{{#if:{{{native_name_lang|}}}|</div>}} }} }} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{#ifeq:{{lc:{{{landscape|}}}}}|yes|{{min|300|{{#if:{{#ifexpr:{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|300|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}}x200px|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}} | caption = {{{image caption|{{{caption|{{{image_caption|}}}}}}}}} | label2 = Pronunciation | data2 = {{{pronunciation|}}} | label10 = Born | data10 = {{Br separated entries|1={{#if:{{{birth_name|{{{birthname|}}}}}}|<div style="display:inline" class="nickname">{{{birth_name|{{{birthname|}}}}}}</div>}}|2={{{birth_date|}}}|3={{#if:{{{birth_place|}}}|<div style="display:inline" class="birthplace">{{{birth_place|}}}</div>}}}} | label11 = Bapti{{#if:{{{baptized|}}}|z|s}}ed | data11 = {{#if:{{{birth_date|}}}||{{{baptized|{{{baptised|}}}}}}}} | label12 = Disappeared | data12 = {{Br separated entries|1={{{disappeared_date|}}}|2={{{disappeared_place|}}}}} | label13 = Status | data13 = {{{status|{{{disappeared_status|}}}}}} | label14 = Died | data14 = {{Br separated entries|1={{{death_date|}}}|2={{#if:{{{death_place|}}}|<div style="display:inline" class="deathplace">{{{death_place|}}}</div>}}}} | label15 = Cause&nbsp;of death | data15 = {{{death cause|{{{death_cause|}}}}}} | label16 = Body discovered | data16 = {{{body discovered|{{{body_discovered|}}}}}} | label17 = {{#if:{{{burial_place|}}}|Burial place|Resting place}} | data17 = {{#if:{{{burial_place|}}}|{{Br separated entries|1={{{burial_place|}}}|2={{{burial_coordinates|}}}}}|{{Br separated entries|1={{{resting place|{{{resting_place|{{{restingplace|}}}}}}}}}|2={{{resting place coordinates|{{{resting_place_coordinates|{{{restingplacecoordinates|}}}}}}}}}}}}} | class17 = label | label18 = Monuments | data18 = {{{monuments|}}} <!-- removed per discussion at https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_person&oldid=932429196#Residence_parameter | label19 = Residence | data19 = {{{residence|}}} | class19 = {{#if:{{{death_date|}}}{{{death_place|}}}||label}} --> | label20 = Nationality | data20 = {{{nationality|}}} | class20 = category | label21 = Other&nbsp;names | data21 = {{{other names|{{{other_names|{{{othername|{{{nickname|{{{alias|}}}}}}}}}}}}}}} | class21 = nickname | label22 = Siglum | data22 = {{{siglum|}}} | label23 = Citizenship | data23 = {{{citizenship|}}} | class23 = category | label24 = Education | data24 = {{{education|}}} | label25 = Alma&nbsp;mater | data25 = {{{alma mater|{{{alma_mater|}}}}}} | label26 = Occupation{{Pluralize from text|{{{occupation|}}}|likely=(s)|plural=s}} | data26 = {{{occupation|}}} | class26 = role | label27 = Years&nbsp;active | data27 = {{{years active|{{{years_active|{{{yearsactive|}}}}}}}}} | label28 = Era | data28 = {{{era|}}} | class28 = category | label29 = Employer{{Pluralize from text|{{{employer|}}}|likely=(s)|plural=s}} | data29 = {{{employer|}}}{{main other|{{Pluralize from text| {{{employer|}}}|likely=[[Category:Pages using infobox person with multiple employers]]}}}} | class29 = org | label30 = {{#if:{{{organisation|}}}|Organisation|Organization}}{{#if:{{{organizations|}}}|s|{{pluralize from text|{{{organization|{{{organisation|}}}}}}|likely=(s)|plural=s}}}} | data30 = {{{organisation|{{{organization|{{{organizations|}}}}}}}}}{{main other|{{Pluralize from text|{{{organization|{{{organisation|}}}}}}|likely=[[Category:Pages using infobox person with multiple organizations]]}}}} | class30 = org | label31 = Agent{{Pluralize from text|{{{agent|}}}|likely=(s)|plural=s}} | data31 = {{{agent|}}}{{main other|{{Pluralize from text|{{{agent|}}}|likely=[[Category:Pages using infobox person with multiple agents]]}}}} | class31 = agent | label32 = Known&nbsp;for | data32 = {{{known for|{{{known_for|{{{known|}}}}}}}}} | label33 = Works | data33 = {{{works|}}} | label34 = <span style="white-space:nowrap;">Notable credit{{Pluralize from text|{{{credits|}}}|likely=(s)|plural=s}}</span> | data34 = {{#if:{{{works|}}}||<!-- -->{{{credits|}}}{{main other|{{Pluralize from text|{{{credits|}}}|likely=[[Category:Pages using infobox person with multiple credits]]}}}}}} | label35 = Label{{Pluralize from text|{{{label_name|}}}|likely=(s)|plural=s}} | data35 = {{#if:{{{works|}}}{{{credits|}}}||<!-- -->{{{label_name|}}}{{main other|{{Pluralize from text|{{{label_name|}}}|likely=[[Category:Pages using infobox person with multiple labels]]}}}}}} | label36 = <span style="white-space:nowrap;">Notable work</span> | data36 = {{#if:{{{works|}}}{{{credits|}}}{{{label_name|}}}||{{{notable works|{{{notable_works|}}}}}}}} | label37 = Style | data37 = {{{style|}}} | class37 = category | label40 = Television | data40 = {{{television|}}} | label41 = Height | data41 = {{#if:{{{height_m|{{{height_cm|}}}}}}{{{height_ft|}}}{{{height_in|}}} | {{convinfobox|{{{height_m|{{{height_cm|}}}}}}|{{#if:{{{height_m|}}}|m|cm}}|{{{height_ft|}}}|ft|{{{height_in|}}}|in}}}}{{#if:{{{height|}}} | {{infobox person/height|{{{height|}}}}}}} | label42 = {{#if:{{{office|}}}|Office|Title}} | data42 = {{{office|{{{title|}}}}}} | class42 = title | label43 = Term | data43 = {{{term|}}} | label44 = Predecessor | data44 = {{{predecessor|}}} | label45 = Successor | data45 = {{{successor|}}} | label46 = Political party | data46 = {{{party|}}} | class46 = org | label47 = Other political<br />affiliations | data47 = {{{otherparty|}}} | class47 = org | label48 = Movement | data48 = {{{movement|}}} | class48 = category | label49 = Opponent{{Pluralize from text|{{{opponents|}}}|likely=(s)|plural=s}} | data49 = {{{opponents|}}}{{main other|{{Pluralize from text|{{{opponents|}}}|likely=[[Category:Pages using infobox person with multiple opponents]]}}}} | label50 = Board member&nbsp;of | data50 = {{{boards|}}} | label51 = {{#if:{{{criminal_charges|}}}|Criminal charges|Criminal charge{{pluralize from text|{{{criminal charge|{{{criminal_charge|}}}}}}|likely=(s)|plural=s}}}} | data51 = {{{criminal_charges|{{{criminal charge|{{{criminal_charge|}}}}}}}}}{{main other|{{Pluralize from text|{{{criminal charge|{{{criminal_charge|}}}}}}|likely=[[Category:Pages using infobox person with multiple criminal charges]]}}}} | label52 = Criminal penalty | data52 = {{{criminal penalty|{{{criminal_penalty|}}}}}} | label53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}}|Judicial status|Criminal status}} | data53 = {{#if:{{{judicial status|{{{judicial_status|}}}}}} | {{{judicial status|{{{judicial_status}}}}}} | {{{criminal status|{{{criminal_status|}}}}}}}} | class53 = category | label54 = Spouse{{#if:{{{spouses|}}}|s|{{Pluralize from text|{{{spouse|{{{spouse(s)|}}}}}}|likely=(s)|plural=s}}}} | data54 = {{{spouse|{{{spouses|{{{spouse(s)|}}}}}}}}}{{main other|{{Pluralize from text| {{{spouse|{{{spouse(s)|}}}}}} |likely=[[Category:Pages using infobox person with multiple spouses]]}}}} | label55 = Partner{{#if:{{{partners|}}}|s|{{Pluralize from text|{{{partner|{{{domesticpartner|{{{domestic_partner|{{{partner(s)|}}}}}}}}}}}} |likely=(s)|plural=s}}}} | data55 = {{{partner|{{{domesticpartner|{{{domestic_partner|{{{partners|{{{partner(s)|}}}}}}}}}}}}}}}{{main other|{{Pluralize from text| {{{partner|{{{domesticpartner|{{{domestic_partner|{{{partner(s)|}}}}}}}}}}}} |likely=[[Category:Pages using infobox person with multiple partners]]}}}} | label56 = Children | data56 = {{{children|}}} | label57 = Parent{{#if:{{{parents|}}}|{{Pluralize from text|{{{parents|}}}|likely=(s)|plural=s}}|<!-- -->{{#ifexpr:{{count|{{{father|}}}|{{{mother|}}}}} > 1|s}}}} | data57 = {{#if:{{{parents|}}}|{{{parents}}}|{{Unbulleted list|{{#if:{{{father|}}}|{{{father}}} (father)}}|{{#if:{{{mother|}}}|{{{mother}}} (mother)}}}}}}<!-- -->{{main other|{{Pluralize from text|{{{parents|}}}|likely=[[Category:Pages using infobox person with multiple parents]]}}}} | label58 = Relatives | data58 = {{{relations|{{{relatives|}}}}}} | label59 = Family | data59 = {{{family|}}} | label60 = Call sign | data60 = {{{callsign|}}} | label61 = Awards | data61 = {{{awards|}}} | label62 = {{#if:{{{honours|}}}|Honours|Honors}} | data62 = {{{honours|{{{honors|}}}}}} | data64 = {{{misc|{{{module|}}}}}} | data65 = {{{misc2|{{{module2|}}}}}} | data66 = {{{misc3|{{{module3|}}}}}} | data67 = {{{misc4|{{{module4|}}}}}} | data68 = {{{misc5|{{{module5|}}}}}} | data69 = {{{misc6|{{{module6|}}}}}} | label70 = Website | data70 = {{{website|{{{homepage|{{{URL|{{{url|}}}}}}}}}}}} | header71 = {{#if:{{{signature|}}}|{{if empty|{{{signature_type|}}}|Signature}}}} | data72 = {{#invoke:InfoboxImage|InfoboxImage|image={{{signature|}}}|size={{{signature_size|}}}|sizedefault=150px|alt={{{signature alt|{{{signature_alt|}}}}}}}} | header73 = {{#if:{{{footnotes|}}}|Notes}} | data74 = {{#if:{{{footnotes|}}}|<div style="text-align: left;">{{{footnotes}}}</div>}} }}<!-- -->{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview = Page using [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=n<!--this check deliberately flags empty unknown parameters; see talk, December 2022--> | abovestyle | agent | alias | alma mater | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | birthname | boards | body discovered | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal charge | criminal penalty | criminal status | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death cause | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | honors | honours | image | image caption | image size | image_caption | image_size | image_upright | imagesize | judicial status | judicial_status | known | known for | known_for | label_name | landscape | misc | misc2 | misc3 | misc4 | misc5 | misc6 | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | nationality | native_name | native_name_lang | nickname | nocat_wdimage | notable works | notable_works | occupation | office | opponents | organisation | organization | organizations | other names | other_names | othername | otherparty | parents | partner | partners | partner(s) | party | predecessor | pre-nominals | post-nominals | pronunciation | relations | relatives | resting place | resting place coordinates | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | siglum | signature | signature alt | signature_alt | signature_size | signature_type | spouse | spouses | spouse(s) | status | style | successor | template_name | television | term | title | URL | url | website | works | years active | years_active | yearsactive }}<!-- -->{{Main other|{{#if:{{{pronunciation|}}}|[[Category:Biography template using pronunciation]]}}<!-- -->{{#if:{{{signature|}}}|[[Category:Biography with signature]]}}<!-- -->[[Category:Articles with hCards]] }}<!-- -->{{#invoke:Check for clobbered parameters|check | nested = 1 | template = [[Template:{{#if:{{{template_name|}}}|{{ucfirst:{{{template_name|}}}}}|Infobox person}}]] | cat = {{main other|Category:Pages using {{if empty|{{{template_name|}}}|infobox person}} with conflicting parameters}} | child; embed | honorific prefix; honorific_prefix; honorific-prefix; pre-nominals | honorific suffix; honorific_suffix; honorific-suffix; post-nominals | image size; image_size; imagesize | image caption; caption; image_caption | birth_name; birthname | baptized; baptised | status; disappeared_status | death cause; death_cause | body discovered; body_discovered | resting place; resting_place; restingplace | resting place coordinates; resting_place_coordinates; restingplacecoordinates | other names; other_names; othername; nickname; alias | alma mater; alma_mater | years active; years_active; yearsactive | organisation; organization; organizations | known for= known_for; known | {{#if:{{{works|}}}|works;}} {{#if:{{{credits|}}}|credits;}} {{#if:{{{label_name|}}}|label_name;}} notable works; notable_works | height_m; height_cm | office; title | criminal_charges; criminal charge; criminal_charge | criminal penalty; criminal_penalty | judicial status; judicial_status | criminal status; criminal_status | spouse; spouses; spouse(s) | partner; domesticpartner; domestic_partner; partners; partner(s) | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{father|}}}||NULL_}}father | {{#if:{{{parents|}}}||NULL_}}parents; {{#if:{{{mother|}}}||NULL_}}mother | relations; relatives | honours; honors | misc; module | misc2; module2 | misc3; module3 | misc4; module4 | misc5; module5 | misc6; module6 | website; homepage; URL; url }}<includeonly>{{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{Wikidata image|1={{{image|}}}|2={{{nocat_wdimage|}}}}}}}</includeonly><noinclude> {{documentation}}</noinclude> bb6b966de0963b0452c3d6004bcb4981c5734904 Template:Abbr 10 388 783 782 2024-03-16T10:46:11Z Motzoid India 2 1 revision imported wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> 5fd53aa19ba927ce3eea9092a4fa31f881df0a6e Module:Lang 828 389 785 784 2024-03-16T10:46:11Z Motzoid India 2 1 revision imported Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transliteration' == template then category = 'Transliteration'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transliteration}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transliteration'); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transliteration'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transliteration'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transliteration'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transliteration'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transliteration'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transliteration'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; b4bf37fa610695625e5f1ff5d33471dfaaf8af34 Module:Unicode data 828 390 787 786 2024-03-16T10:46:12Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 05d32e957906aa3f5219ad820cb06d9a096ea697 Module:Lang/data 828 391 789 788 2024-03-16T10:46:12Z Motzoid India 2 1 revision imported Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['cmn'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; d521432b8bb206c7e58735aef9488a3b323502b5 Module:Language/data/iana languages 828 392 791 790 2024-03-16T10:46:12Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2024-03-07 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["cls"] = {"Classical Sanskrit"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rrm"] = {"Moriori"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsn"] = {"Vedic Sanskrit"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } e2e99d5986905d81c9545501e430f3b244ecd166 Module:Language/data/iana scripts 828 393 793 792 2024-03-16T10:46:13Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2024-03-07 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } abd91245564d473fdb44e3bb808df6ab6bc40256 Module:Language/data/iana regions 828 394 795 794 2024-03-16T10:46:13Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2024-03-07 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 84f811ae4cc14650da1f682f26e93ef6785312ed Module:Language/data/iana variants 828 395 797 796 2024-03-16T10:46:13Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2024-03-07 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["anpezo"] = { ["descriptions"] = {"Anpezo standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fascia"] = { ["descriptions"] = {"Fascia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fodom"] = { ["descriptions"] = {"Fodom standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["gherd"] = { ["descriptions"] = {"Gherdëina standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["pehoeji"] = { ["descriptions"] = {"Hokkien Vernacular Romanization System", "Pe̍h-ōe-jī orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tailo"] = { ["descriptions"] = {"Taiwanese Hokkien Romanization System for Hokkien languages", "Tâi-lô orthography/romanization"}, ["prefixes"] = {"nan-latn"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valbadia"] = { ["descriptions"] = {"Val Badia standard of Ladin"}, ["prefixes"] = {"lld"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } 946471b19830483da16c76dbb9e1a7867ce11bdc Module:Language/data/iana suppressed scripts 828 396 799 798 2024-03-16T10:46:14Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2024-03-07 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } c6e43ac4caba75761efe732bbf8c47798c1e644f Module:Lang/ISO 639 synonyms 828 397 801 800 2024-03-16T10:46:14Z Motzoid India 2 1 revision imported Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Module:Yesno 828 398 803 802 2024-03-16T10:46:14Z Motzoid India 2 1 revision imported Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Arguments 828 9 805 13 2024-03-16T10:46:15Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Template:Mbox 10 399 807 806 2024-03-16T10:46:15Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Template:Tl 10 400 809 808 2024-03-16T10:46:15Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Template link 10 401 811 810 2024-03-16T10:46:16Z Motzoid India 2 1 revision imported wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Module:Message box 828 402 813 812 2024-03-16T10:46:16Z Motzoid India 2 1 revision imported Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Module:Message box/configuration 828 403 815 814 2024-03-16T10:46:16Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } ccb6bdf2868087b6833d203307f2f6a92b3b0a01 Module:Redirect 828 404 817 816 2024-03-16T10:46:16Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Template:Mono 10 405 819 818 2024-03-16T10:46:17Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:Ifsubst 10 406 821 820 2024-03-16T10:46:17Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:Mono/styles.css 10 407 823 822 2024-03-16T10:46:17Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Yesno 10 408 825 824 2024-03-16T10:46:18Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Template:If both 10 409 827 826 2024-03-16T10:46:18Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#if:{{{1|}}}| {{{{{|safesubst:}}}#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}} |{{{4|}}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> d77fc191cada8977a8131dd6d85dde5e31d0e6f2 Template:Yesno-yes 10 410 829 828 2024-03-16T10:46:18Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Template:Flatlist 10 411 831 830 2024-03-16T10:46:19Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> cf60aa4aef920d48fa394e786f72fe5f6dcd3169 Template:Main other 10 412 833 832 2024-03-16T10:46:19Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Template:Hlist 10 15 835 23 2024-03-16T10:46:19Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Template:Hlist/styles.css}} {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 83139ca93e3bf55c6968bf543f5681f2ef87f3af Template:Br separated entries 10 413 837 836 2024-03-16T10:46:19Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Separated entries|br}}<noinclude> {{documentation}} </noinclude> 2019f7fc383259e70d66e43cbd97a43d20889f1b Template:Unbulleted list 10 414 839 838 2024-03-16T10:46:20Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Module:Check for unknown parameters 828 415 841 840 2024-03-16T10:46:20Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:String 828 416 843 842 2024-03-16T10:46:20Z Motzoid India 2 1 revision imported Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 2ad0905c56ef4955950b75a8f00974fe82aed5e4 Module:Infobox 828 417 845 844 2024-03-16T10:46:21Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:InfoboxImage 828 418 847 846 2024-03-16T10:46:21Z Motzoid India 2 1 revision imported Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,8) == mw.ustring.char(127).."'\"`UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 35066ee19938554ca6eeb18d6e22d2063336b7e1 Module:Infobox/styles.css 828 419 849 848 2024-03-16T10:46:21Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:List 828 13 851 17 2024-03-16T10:46:22Z Motzoid India 2 1 revision imported Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:TableTools 828 14 853 18 2024-03-16T10:46:22Z Motzoid India 2 1 revision imported Scribunto text/plain --[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke. -- ------------------------------------------------------------------------------------ --]] local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti --[[ ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ --]] function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end --[[ ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a value can be a valid table key. Lua will -- generate an error if a NaN is used as a table key. ------------------------------------------------------------------------------------ --]] function p.isNan(v) return type(v) == 'number' and tostring(v) == '-nan' end --[[ ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ --]] function p.shallowClone(t) local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end --[[ ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ --]] function p.removeDuplicates(t) checkType('removeDuplicates', 1, t, 'table') local isNan = p.isNan local ret, exists = {}, {} for i, v in ipairs(t) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end --[[ ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ --]] function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k, v in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will -- return {1, 3, 6}. ------------------------------------------------------------------------------------ --]] function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k, v in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table -- of subtables in the format -- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} } -- Keys that don't end with an integer are stored in a subtable named "other". -- The compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end --[[ ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end --[[ ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ --]] function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end --[[ ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ --]] function p.size(t) checkType('size', 1, t, 'table') local i = 0 for k in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 else -- This will fail with table, boolean, function. return item1 < item2 end end --[[ Returns a list of the keys in a table, sorted using either a default comparison function or a custom keySort function. ]] function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' }) end local list = {} local index = 1 for key, value in pairs(t) do list[index] = key index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(list, keySort) end return list end --[[ Iterates through a table, with the keys sorted using the keysToList function. If there are only numerical keys, sparseIpairs is probably more efficient. ]] function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local list = p.keysToList(t, keySort, true) local i = 0 return function() i = i + 1 local key = list[i] if key ~= nil then return key, t[key] else return nil, nil end end end --[[ Returns true if all keys in the table are consecutive integers starting at 1. --]] function p.isArray(t) checkType("isArray", 1, t, "table") local i = 0 for k, v in pairs(t) do i = i + 1 if t[i] == nil then return false end end return true end -- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 } function p.invert(array) checkType("invert", 1, array, "table") local map = {} for i, v in ipairs(array) do map[v] = i end return map end --[[ { "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true } --]] function p.listToSet(t) checkType("listToSet", 1, t, "table") local set = {} for _, item in ipairs(t) do set[item] = true end return set end --[[ Recursive deep copy function. Preserves identities of subtables. ]] local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = deepcopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end --[[ Concatenates all values in the table that are indexed by a number, in order. sparseConcat{ a, nil, c, d } => "acd" sparseConcat{ nil, b, c, d } => "bcd" ]] function p.sparseConcat(t, sep, i, j) local list = {} local list_i = 0 for _, v in p.sparseIpairs(t) do list_i = list_i + 1 list[list_i] = v end return table.concat(list, sep, i, j) end --[[ -- Finds the length of an array, or of a quasi-array with keys such -- as "data1", "data2", etc., using an exponential search algorithm. -- It is similar to the operator #, but may return -- a different value when there are gaps in the array portion of the table. -- Intended to be used on data loaded with mw.loadData. For other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of -- the number of unnamed template parameters, so use this function for -- frame.args. --]] function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] -- which is only needed by this one function -- doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function(i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p ad3062fee63cdfb979a1543abf96236cf7bf609d Module:Separated entries 828 420 855 854 2024-03-16T10:46:22Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) return mw.text.listToText(values, separator, conjunction) end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p e80231ff3de01afd7f62a94e0a34dc1e67504085 Template:Delink 10 421 857 856 2024-03-16T10:46:22Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:delink|delink}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> ccf86b4255142fffb206ab8240f36ed22e029d6a Module:Delink 828 422 859 858 2024-03-16T10:46:23Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module de-links most wikitext. require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per [[Help:Pipe trick]]. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:match("%[%[.-:(.*)|%]%]") -- If there are no colons, grab all of the text apart from the square brackets and the pipe. else s = s:match("%[%[(.*)|%]%]") end -- Next up, brackets and commas. if s:match("%(.-%)$") then -- Brackets trump commas. s = s:match("(.-) ?%(.-%)$") elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. s = s:match("(.-),.*$") end return s end -- Return wikilink target |wikilinks=target local function getDelinkedTarget(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end return target_area end local function getDelinkedLabel(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end -- Check for categories, interwikis, and files. local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon. local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace if mw.language.isKnownLanguageTag(colon_prefix) or (ns and (ns.canonicalName == "File" or ns.canonicalName == "Category")) then return "" end -- Remove the colon if the link is using the [[Help:Colon trick]]. if result:match("%[%[:") then result = "[[" .. result:match("%[%[:(.*%]%])") end -- Deal with links using the [[Help:Pipe trick]]. if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then return delinkPipeTrick(result) end -- Find the display area of the wikilink if result:match("|") then -- Find if we're dealing with a piped link. result = result:match("^%[%[.-|(.+)%]%]") -- Remove new lines from the display of multiline piped links, -- where the pipe is before the first new line. result = result:gsub("\n", "") else result = result:match("^%[%[(.-)%]%]") end return result end local function delinkURL(s) -- Assume we have already delinked internal wikilinks, and that -- we have been passed some text between two square brackets [foo]. -- If the text contains a line break it is not formatted as a URL, regardless of other content. if s:match("\n") then return s end -- Check if the text has a valid URL prefix and at least one valid URL character. local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"} local url_prefix for _ ,v in ipairs(valid_url_prefixes) do if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then url_prefix = v break end end -- Get display text if not url_prefix then return s end s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket. s = s:match('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ). s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded, "%c") then return s end return s_decoded end local function delinkLinkClass(text, pattern, delinkFunction) if type(text) ~= "string" then error("Attempt to de-link non-string input.", 2) end if type(pattern) ~= "string" or mw.ustring.sub(pattern, 1, 1) ~= "^" then error('Invalid pattern detected. Patterns must begin with "^".', 2) end -- Iterate over the text string, and replace any matched text. using the -- delink function. We need to iterate character by character rather -- than just use gsub, otherwise nested links aren't detected properly. local result = "" while text ~= "" do -- Replace text using one iteration of gsub. text = mw.ustring.gsub(text, pattern, delinkFunction, 1) -- Append the left-most character to the result string. result = result .. mw.ustring.sub(text, 1, 1) text = mw.ustring.sub(text, 2, -1) end return result end function p._delink(args) local text = args[1] or "" if args.refs == "yes" then -- Remove any [[Help:Strip markers]] representing ref tags. In most situations -- this is not a good idea - only use it if you know what you are doing! text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "") end if args.comments ~= "no" then text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments. end if args.wikilinks ~= "no" and args.wikilinks ~= "target" then -- De-link wikilinks and return the label portion of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel) elseif args.wikilinks == "target" then -- De-link wikilinks and return the target portions of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget) end if args.urls ~= "no" then text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs. end if args.whitespace ~= "no" then -- Replace single new lines with a single space, but leave double new lines -- and new lines only containing spaces or tabs before a second new line. text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2") text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces. end return text end function p.delink(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._delink(getArgs(frame, {wrappers = 'Template:Delink'})) end return p 5b8e75ac750b5d3ed76cc4158aefcd1568a6a6fd Template:Tlx 10 423 861 860 2024-03-16T10:46:23Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link expanded 10 424 863 862 2024-03-16T10:46:23Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Module:Template link general 828 425 865 864 2024-03-16T10:46:24Z Motzoid India 2 1 revision imported Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:Block indent 10 426 867 866 2024-03-16T10:46:24Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Block indent/styles.css"/><div class="block-indent {{{class|}}}" {{#if:{{{left|}}}{{{em|}}}{{{right|}}}{{{style|}}}|style="{{#if:{{{left|{{{em|}}}}}}|padding-left: {{{left|{{{em}}}}}}em;}}{{#if:{{{right|}}}|padding-right: {{{right}}}em;}}{{#if:{{{style|}}}|{{{style}}}}}"}}>{{{1|{{{text|{{{content|{{{quote|<noinclude>{{lorem ipsum}}</noinclude><includeonly>{{error|Error: No content given to indent (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}}}}}}}}</div><noinclude> {{documentation}} </noinclude> f1e4d04c02e97bfe86521e96e8265e947e574340 Template:Block indent/styles.css 10 427 869 868 2024-03-16T10:46:24Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .block-indent { padding-left: 3em; padding-right: 0; overflow: hidden; } c89721fb334bfbd775783b44641a3466b6748d6b Template:Template other 10 428 871 870 2024-03-16T10:46:24Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Xt 10 429 873 872 2024-03-16T10:46:25Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: #006400;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<noinclude> {{Documentation}} </noinclude> e8c5895953384f68b9648a698f7f33d79748e408 Template:!xt 10 430 875 874 2024-03-16T10:46:25Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example deprecated-content example-bad" style="font-family: Georgia, 'DejaVu Serif', serif; color: #8B0000;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<noinclude> {{Documentation}} </noinclude> 5c54359c619901a0b19422399dc9a3e324e02879 Template:Reflist 10 431 877 876 2024-03-16T10:46:26Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><div class="reflist <!-- -->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!-- -->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!-- -->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class -->{{#if: {{{1|}}}<!-- start style --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}} | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}} }}> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 8c65cc88272db6c0f5cf2b49f84d3e460e60ee5f Template:Reflist/styles.css 10 432 879 878 2024-03-16T10:46:26Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ /* can we remove the font size declarations? .references gets a font-size in * common.css that is always 90, and there is nothing else in reflist out in * the wild. May affect column sizes. */ .reflist { font-size: 90%; /* Default font-size */ margin-bottom: 0.5em; list-style-type: decimal; } .reflist .references { font-size: 100%; /* Reset font-size when nested in div.reflist */ margin-bottom: 0; /* Avoid double margin when nested in div.reflist */ list-style-type: inherit; /* Enable custom list style types */ } /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Reset top margin for lists embedded in columns */ .reflist-columns { margin-top: 0.3em; } .reflist-columns ol { margin-top: 0; } /* Avoid elements breaking between columns */ .reflist-columns li { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } .reflist-upper-alpha { list-style-type: upper-alpha; } .reflist-upper-roman { list-style-type: upper-roman; } .reflist-lower-alpha { list-style-type: lower-alpha; } .reflist-lower-greek { list-style-type: lower-greek; } .reflist-lower-roman { list-style-type: lower-roman; } 531a26d48f0e7826c61f764cfb7d5fb200032c34 Template:Clear 10 433 881 880 2024-03-16T10:46:26Z Motzoid India 2 1 revision imported wikitext text/x-wiki <div style="clear:{{{1|both}}};" class={{{class|}}}></div><noinclude> {{documentation}} </noinclude> 5b24b9fd5cc166a8c486e2422d5df465206ed39c Template:PAGENAMEBASE 10 434 883 882 2024-03-16T10:46:26Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f Template:If empty 10 435 885 884 2024-03-16T10:46:27Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Module:If empty 828 436 887 886 2024-03-16T10:46:27Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Module:If preview 828 437 889 888 2024-03-16T10:46:27Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p 9a92196d0001b8016f2501aedfadcc3adcb974ef Module:If preview/configuration 828 438 891 890 2024-03-16T10:46:28Z Motzoid India 2 1 revision imported Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } 3edc8897c51a61b9e710b2a4d9eb657b3c2f1034 Module:If preview/styles.css 828 439 893 892 2024-03-16T10:46:28Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } 8b79ffc4853d424a805b084de00030e04bbd573e Template:Lang 10 440 895 894 2024-03-16T10:46:28Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Lang|{{{fn|lang}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> ed35aafbfe8198c5ad80fd861124244d0c7f2742 Template:Main 10 441 897 896 2024-03-16T10:46:28Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Template:Navbox 10 442 899 898 2024-03-16T10:46:29Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Template:Small 10 443 901 900 2024-03-16T10:46:29Z Motzoid India 2 1 revision imported wikitext text/x-wiki <span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude> {{Documentation}}<!--Categories and interwikis go in the /doc sub-page.--> </noinclude> 76d3535c2917cc3bfb1b032506073faa15e1a480 Template:Plainlist 10 444 903 902 2024-03-16T10:46:29Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Module:Effective protection expiry 828 445 905 904 2024-03-16T10:46:30Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Effective protection level 828 446 907 906 2024-03-16T10:46:30Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p b6cb1e5589ec6575118f60841644cd65defa7174 Module:Exponential search 828 447 909 908 2024-03-16T10:46:30Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:File link 828 448 911 910 2024-03-16T10:46:30Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Module:Format link 828 449 913 912 2024-03-16T10:46:31Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Hatnote 828 450 915 914 2024-03-16T10:46:31Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:Hatnote/styles.css 828 451 917 916 2024-03-16T10:46:31Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Hatnote list 828 452 919 918 2024-03-16T10:46:32Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation at end of string, ignoring italics and links local function punctuationCollapse (text) return text:match("[.?!]('?)%1(%]?)%2%.$") and text:sub(1, -2) or text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p 1c8e6212115f76ecc3db8d05137011cd18207988 Module:Labelled list hatnote 828 453 921 920 2024-03-16T10:46:32Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Module:Age 828 454 923 922 2024-03-16T10:46:32Z Motzoid India 2 1 revision imported Scribunto text/plain -- Implement various "age of" and other date-related templates. local mtext = { -- Message and other text that should be localized. -- Also need to localize text in table names in function dateDifference. ['mt-bad-param1'] = 'Invalid parameter $1', ['mt-bad-param2'] = 'Parameter $1=$2 is invalid', ['mt-bad-show'] = 'Parameter show=$1 is not supported here', ['mt-cannot-add'] = 'Cannot add "$1"', ['mt-conflicting-show'] = 'Parameter show=$1 conflicts with round=$2', ['mt-date-wrong-order'] = 'The second date must be later in time than the first date', ['mt-dd-future'] = 'Death date (first date) must not be in the future', ['mt-dd-wrong-order'] = 'Death date (first date) must be later in time than the birth date (second date)', ['mt-invalid-bd-age'] = 'Invalid birth date for calculating age', ['mt-invalid-dates-age'] = 'Invalid dates for calculating age', ['mt-invalid-end'] = 'Invalid end date in second parameter', ['mt-invalid-start'] = 'Invalid start date in first parameter', ['mt-need-jdn'] = 'Need valid Julian date number', ['mt-need-valid-bd'] = 'Need valid birth date: year, month, day', ['mt-need-valid-bd2'] = 'Need valid birth date (second date): year, month, day', ['mt-need-valid-date'] = 'Need valid date', ['mt-need-valid-dd'] = 'Need valid death date (first date): year, month, day', ['mt-need-valid-ymd'] = 'Need valid year, month, day', ['mt-need-valid-ymd-current'] = 'Need valid year|month|day or "currentdate"', ['mt-need-valid-ymd2'] = 'Second date should be year, month, day', ['mt-template-bad-name'] = 'The specified template name is not valid', ['mt-template-x'] = 'The template invoking this must have "|template=x" where x is the wanted operation', ['txt-and'] = ' and ', ['txt-or'] = '&nbsp;or ', ['txt-category'] = 'Category:Age error', ['txt-comma-and'] = ', and ', ['txt-error'] = 'Error: ', ['txt-format-default'] = 'mf', -- 'df' (day first = dmy) or 'mf' (month first = mdy) ['txt-module-convertnumeric'] = 'Module:ConvertNumeric', ['txt-module-date'] = 'Module:Date', ['txt-sandbox'] = 'sandbox', ['txt-bda'] = '<span style="display:none"> (<span class="bday">$1</span>) </span>$2<span class="noprint ForceAgeToShow"> (age&nbsp;$3)</span>', ['txt-dda'] = '$2<span style="display:none">($1)</span> (aged&nbsp;$3)', ['txt-bda-disp'] = 'disp_raw', -- disp_raw → age is a number only; disp_age → age is a number and unit (normally years but months or days if very young) ['txt-dda-disp'] = 'disp_raw', ['txt-dmy'] = '%-d %B %-Y', ['txt-mdy'] = '%B %-d, %-Y', } local isWarning = { ['mt-bad-param1'] = true, } local translate, from_en, to_en, isZero if translate then -- Functions to translate from en to local language and reverse go here. -- See example at [[:bn:Module:বয়স]]. else from_en = function (text) return text end isZero = function (text) return tonumber(text) == 0 end end local _Date, _currentDate local function getExports(frame) -- Return objects exported from the date module or its sandbox. if not _Date then local sandbox = frame:getTitle():find(mtext['txt-sandbox'], 1, true) and ('/' .. mtext['txt-sandbox']) or '' local datemod = require(mtext['txt-module-date'] .. sandbox) local realDate = datemod._Date _currentDate = datemod._current if to_en then _Date = function (...) local args = {} for i, v in ipairs({...}) do args[i] = to_en(v) end return realDate(unpack(args)) end else _Date = realDate end end return _Date, _currentDate end local Collection -- a table to hold items Collection = { add = function (self, item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end, join = function (self, sep) return table.concat(self, sep) end, remove = function (self, pos) if self.n > 0 and (pos == nil or (0 < pos and pos <= self.n)) then self.n = self.n - 1 return table.remove(self, pos) end end, sort = function (self, comp) table.sort(self, comp) end, new = function () return setmetatable({n = 0}, Collection) end } Collection.__index = Collection local function stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function dateFormat(args) -- Return string for wanted date format. local default = mtext['txt-format-default'] local other = default == 'df' and 'mf' or 'df' local wanted = stripToNil(args[other]) and other or default return wanted == 'df' and mtext['txt-dmy'] or mtext['txt-mdy'] end local function substituteParameters(text, ...) -- Return text after substituting any given parameters for $1, $2, etc. return mw.message.newRawMessage(text, ...):plain() end local function yes(parameter) -- Return true if parameter should be interpreted as "yes". -- Do not want to accept mixed upper/lowercase unless done by current templates. -- Need to accept "on" because "round=on" is wanted. return ({ y = true, yes = true, on = true })[parameter] end local function message(msg, ...) -- Return formatted message text for an error or warning. local function getText(msg) return mtext[msg] or error('Bug: message "' .. tostring(msg) .. '" not defined') end local categories = { error = mtext['txt-category'], warning = mtext['txt-category'], } local a, b, k, category local text = substituteParameters(getText(msg), ...) if isWarning[msg] then a = '<sup>[<i>' b = '</i>]</sup>' k = 'warning' else a = '<strong class="error">' .. getText('txt-error') b = '</strong>' k = 'error' end if mw.title.getCurrentTitle():inNamespaces(0) then -- Category only in namespaces: 0=article. category = '[[' .. categories[k] .. ']]' end return a .. mw.text.nowiki(text) .. b .. (category or '') end local function formatNumber(number) -- Return the given number formatted with commas as group separators, -- given that the number is an integer. local numstr = tostring(number) local length = #numstr local places = Collection.new() local pos = 0 repeat places:add(pos) pos = pos + 3 until pos >= length places:add(length) local groups = Collection.new() for i = places.n, 2, -1 do local p1 = length - places[i] + 1 local p2 = length - places[i - 1] groups:add(numstr:sub(p1, p2)) end return groups:join(',') end local function spellNumber(number, options, i) -- Return result of spelling number, or -- return number (as a string) if cannot spell it. -- i == 1 for the first number which can optionally start with an uppercase letter. number = tostring(number) return require(mtext['txt-module-convertnumeric']).spell_number( number, nil, -- fraction numerator nil, -- fraction denominator i == 1 and options.upper, -- true: 'One' instead of 'one' not options.us, -- true: use 'and' between tens/ones etc options.adj, -- true: hyphenated options.ordinal -- true: 'first' instead of 'one' ) or number end local function makeExtra(args, flagCurrent) -- Return extra text that will be inserted before the visible result -- but after any sort key. local extra = args.prefix or '' if mw.ustring.len(extra) > 1 then -- Parameter "~" gives "~3" whereas "over" gives "over 3". if extra:sub(-6, -1) ~= '&nbsp;' then extra = extra .. ' ' end end if flagCurrent then extra = '<span class="currentage"></span>' .. extra end return extra end local function makeSort(value, sortable) -- Return a sort key if requested. -- Assume value is a valid number which has not overflowed. if sortable == 'sortable_table' or sortable == 'sortable_on' or sortable == 'sortable_debug' then local sortKey if value == 0 then sortKey = '5000000000000000000' else local mag = math.floor(math.log10(math.abs(value)) + 1e-14) if value > 0 then sortKey = 7000 + mag else sortKey = 2999 - mag value = value + 10^(mag+1) end sortKey = string.format('%d', sortKey) .. string.format('%015.0f', math.floor(value * 10^(14-mag))) end local result if sortable == 'sortable_table' then result = 'data-sort-value="_SORTKEY_"|' elseif sortable == 'sortable_debug' then result = '<span data-sort-value="_SORTKEY_♠"><span style="border:1px solid">_SORTKEY_♠</span></span>' else result = '<span data-sort-value="_SORTKEY_♠"></span>' end return (result:gsub('_SORTKEY_', sortKey)) end end local translateParameters = { abbr = { off = 'abbr_off', on = 'abbr_on', }, disp = { age = 'disp_age', raw = 'disp_raw', }, format = { raw = 'format_raw', commas = 'format_commas', }, round = { on = 'on', yes = 'on', months = 'ym', weeks = 'ymw', days = 'ymd', hours = 'ymdh', }, sep = { comma = 'sep_comma', [','] = 'sep_comma', serialcomma = 'sep_serialcomma', space = 'sep_space', }, show = { hide = { id = 'hide' }, y = { 'y', id = 'y' }, ym = { 'y', 'm', id = 'ym' }, ymd = { 'y', 'm', 'd', id = 'ymd' }, ymw = { 'y', 'm', 'w', id = 'ymw' }, ymwd = { 'y', 'm', 'w', 'd', id = 'ymwd' }, yd = { 'y', 'd', id = 'yd', keepZero = true }, m = { 'm', id = 'm' }, md = { 'm', 'd', id = 'md' }, w = { 'w', id = 'w' }, wd = { 'w', 'd', id = 'wd' }, h = { 'H', id = 'h' }, hm = { 'H', 'M', id = 'hm' }, hms = { 'H', 'M', 'S', id = 'hms' }, M = { 'M', id = 'M' }, s = { 'S', id = 's' }, d = { 'd', id = 'd' }, dh = { 'd', 'H', id = 'dh' }, dhm = { 'd', 'H', 'M', id = 'dhm' }, dhms = { 'd', 'H', 'M', 'S', id = 'dhms' }, ymdh = { 'y', 'm', 'd', 'H', id = 'ymdh' }, ymdhm = { 'y', 'm', 'd', 'H', 'M', id = 'ymdhm' }, ymwdh = { 'y', 'm', 'w', 'd', 'H', id = 'ymwdh' }, ymwdhm = { 'y', 'm', 'w', 'd', 'H', 'M', id = 'ymwdhm' }, }, sortable = { off = false, on = 'sortable_on', table = 'sortable_table', debug = 'sortable_debug', }, } local spellOptions = { cardinal = {}, Cardinal = { upper = true }, cardinal_us = { us = true }, Cardinal_us = { us = true, upper = true }, ordinal = { ordinal = true }, Ordinal = { ordinal = true, upper = true }, ordinal_us = { ordinal = true, us = true }, Ordinal_us = { ordinal = true, us = true, upper = true }, } local function dateExtract(frame) -- Return part of a date after performing an optional operation. local Date = getExports(frame) local args = frame:getParent().args local parms = {} for i, v in ipairs(args) do parms[i] = v end if yes(args.fix) then table.insert(parms, 'fix') end if yes(args.partial) then table.insert(parms, 'partial') end local show = stripToNil(args.show) or 'dmy' local date = Date(unpack(parms)) if not date then if show == 'format' then return 'error' end return message('mt-need-valid-date') end local add = stripToNil(args.add) if add then for item in add:gmatch('%S+') do date = date + item if not date then return message('mt-cannot-add', item) end end end local sortKey, result local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date.partial and date.partial.first or date).jdz sortKey = makeSort(value, sortable) end if show ~= 'hide' then result = date[show] if result == nil then result = from_en(date:text(show)) elseif type(result) == 'boolean' then result = result and '1' or '0' else result = from_en(tostring(result)) end end return (sortKey or '') .. makeExtra(args) .. (result or '') end local function rangeJoin(range) -- Return text to be used between a range of ages. return range == 'dash' and '–' or mtext['txt-or'] end local function makeText(values, components, names, options, noUpper) -- Return wikitext representing an age or duration. local text = Collection.new() local count = #values local sep = names.sep or '' for i, v in ipairs(values) do -- v is a number (say 4 for 4 years), or a table ({4,5} for 4 or 5 years). local islist = type(v) == 'table' if (islist or v > 0) or (text.n == 0 and i == count) or (text.n > 0 and components.keepZero) then local fmt, vstr if options.spell then fmt = function(number) return spellNumber(number, options.spell, noUpper or i) end elseif i == 1 and options.format == 'format_commas' then -- Numbers after the first should be small and not need formatting. fmt = formatNumber else fmt = tostring end if islist then vstr = fmt(v[1]) .. rangeJoin(options.range) noUpper = true vstr = vstr .. fmt(v[2]) else vstr = fmt(v) end local name = names[components[i]] if name then if type(name) == 'table' then name = mw.getContentLanguage():plural(islist and v[2] or v, name) end text:add(vstr .. sep .. name) else text:add(vstr) end end end local first, last if options.join == 'sep_space' then first = ' ' last = ' ' elseif options.join == 'sep_comma' then first = ', ' last = ', ' elseif options.join == 'sep_serialcomma' and text.n > 2 then first = ', ' last = mtext['txt-comma-and'] else first = ', ' last = mtext['txt-and'] end for i, v in ipairs(text) do if i < text.n then text[i] = v .. (i + 1 < text.n and first or last) end end local sign = '' if options.isnegative then -- Do not display negative zero. if text.n > 1 or (text.n == 1 and text[1]:sub(1, 1) ~= '0' ) then if options.format == 'format_raw' then sign = '-' -- plain hyphen so result can be used in a calculation else sign = '−' -- Unicode U+2212 MINUS SIGN end end end return (options.sortKey or '') .. (options.extra or '') .. sign .. text:join() .. (options.suffix or '') end local function dateDifference(parms) -- Return a formatted date difference using the given parameters -- which have been validated. local names = { -- Each name is: -- * a string if no plural form of the name is used; or -- * a table of strings, one of which is selected using the rules at -- https://translatewiki.net/wiki/Plural/Mediawiki_plural_rules abbr_off = { sep = '&nbsp;', y = {'year', 'years'}, m = {'month', 'months'}, w = {'week', 'weeks'}, d = {'day', 'days'}, H = {'hour', 'hours'}, M = {'minute', 'minutes'}, S = {'second', 'seconds'}, }, abbr_on = { y = 'y', m = 'm', w = 'w', d = 'd', H = 'h', M = 'm', S = 's', }, abbr_infant = { -- for {{age for infant}} sep = '&nbsp;', y = {'yr', 'yrs'}, m = {'mo', 'mos'}, w = {'wk', 'wks'}, d = {'day', 'days'}, H = {'hr', 'hrs'}, M = {'min', 'mins'}, S = {'sec', 'secs'}, }, abbr_raw = {}, } local diff = parms.diff -- must be a valid date difference local show = parms.show -- may be nil; default is set below local abbr = parms.abbr or 'abbr_off' local defaultJoin if abbr ~= 'abbr_off' then defaultJoin = 'sep_space' end if not show then show = 'ymd' if parms.disp == 'disp_age' then if diff.years < 3 then defaultJoin = 'sep_space' if diff.years >= 1 then show = 'ym' else show = 'md' end else show = 'y' end end end if type(show) ~= 'table' then show = translateParameters.show[show] end if parms.disp == 'disp_raw' then defaultJoin = 'sep_space' abbr = 'abbr_raw' elseif parms.wantSc then defaultJoin = 'sep_serialcomma' end local diffOptions = { round = parms.round, duration = parms.wantDuration, range = parms.range and true or nil, } local sortKey if parms.sortable then local value = diff.age_days + (parms.wantDuration and 1 or 0) -- days and fraction of a day if diff.isnegative then value = -value end sortKey = makeSort(value, parms.sortable) end local textOptions = { extra = parms.extra, format = parms.format, join = parms.sep or defaultJoin, isnegative = diff.isnegative, range = parms.range, sortKey = sortKey, spell = parms.spell, suffix = parms.suffix, -- not currently used } if show.id == 'hide' then return sortKey or '' end local values = { diff:age(show.id, diffOptions) } if values[1] then return makeText(values, show, names[abbr], textOptions) end if diff.partial then -- Handle a more complex range such as -- {{age_yd|20 Dec 2001|2003|range=yes}} → 1 year, 12 days or 2 years, 11 days local opt = { format = textOptions.format, join = textOptions.join, isnegative = textOptions.isnegative, spell = textOptions.spell, } return (textOptions.sortKey or '') .. makeText({ diff.partial.mindiff:age(show.id, diffOptions) }, show, names[abbr], opt) .. rangeJoin(textOptions.range) .. makeText({ diff.partial.maxdiff:age(show.id, diffOptions) }, show, names[abbr], opt, true) .. (textOptions.suffix or '') end return message('mt-bad-show', show.id) end local function getDates(frame, getopt) -- Parse template parameters and return one of: -- * date (a date table, if single) -- * date1, date2 (two date tables, if not single) -- * text (a string error message) -- A missing date is optionally replaced with the current date. -- If wantMixture is true, a missing date component is replaced -- from the current date, so can get a bizarre mixture of -- specified/current y/m/d as has been done by some "age" templates. -- Some results may be placed in table getopt. local Date, currentDate = getExports(frame) getopt = getopt or {} local function flagCurrent(text) -- This allows the calling template to detect if the current date has been used, -- that is, whether both dates have been entered in a template expecting two. -- For example, an infobox may want the age when an event occurred, not the current age. -- Don't bother detecting if wantMixture is used because not needed and it is a poor option. if not text then if getopt.noMissing then return nil -- this gives a nil date which gives an error end text = 'currentdate' if getopt.flag == 'usesCurrent' then getopt.usesCurrent = true end end return text end local args = frame:getParent().args local fields = {} local isNamed = args.year or args.year1 or args.year2 or args.month or args.month1 or args.month2 or args.day or args.day1 or args.day2 if isNamed then fields[1] = args.year1 or args.year fields[2] = args.month1 or args.month fields[3] = args.day1 or args.day fields[4] = args.year2 fields[5] = args.month2 fields[6] = args.day2 else for i = 1, 6 do fields[i] = args[i] end end local imax = 0 for i = 1, 6 do fields[i] = stripToNil(fields[i]) if fields[i] then imax = i end if getopt.omitZero and i % 3 ~= 1 then -- omit zero months and days as unknown values but keep year 0 which is 1 BCE if isZero(fields[i]) then fields[i] = nil getopt.partial = true end end end local fix = getopt.fix and 'fix' or '' local partialText = getopt.partial and 'partial' or '' local dates = {} if isNamed or imax >= 3 then local nrDates = getopt.single and 1 or 2 if getopt.wantMixture then -- Cannot be partial since empty fields are set from current. local components = { 'year', 'month', 'day' } for i = 1, nrDates * 3 do fields[i] = fields[i] or currentDate[components[i > 3 and i - 3 or i]] end for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (m == 2 or m == '2') and (d == 29 or d == '29') then -- Workaround error with following which attempt to use invalid date 2001-02-29. -- {{age_ymwd|year1=2001|year2=2004|month2=2|day2=29}} -- {{age_ymwd|year1=2001|month1=2|year2=2004|month2=1|day2=29}} -- TODO Get rid of wantMixture because even this ugly code does not handle -- 'Feb' or 'February' or 'feb' or 'february'. if not ((y % 4 == 0 and y % 100 ~= 0) or y % 400 == 0) then d = 28 end end dates[i] = Date(y, m, d) end else -- If partial dates are allowed, accept -- year only, or -- year and month only -- Do not accept year and day without a month because that makes no sense -- (and because, for example, Date('partial', 2001, nil, 12) sets day = nil, not 12). for i = 1, nrDates do local index = i == 1 and 1 or 4 local y, m, d = fields[index], fields[index+1], fields[index+2] if (getopt.partial and y and (m or not d)) or (y and m and d) then dates[i] = Date(fix, partialText, y, m, d) elseif not y and not m and not d then dates[i] = Date(flagCurrent()) end end end else getopt.textdates = true -- have parsed each date from a single text field dates[1] = Date(fix, partialText, flagCurrent(fields[1])) if not getopt.single then dates[2] = Date(fix, partialText, flagCurrent(fields[2])) end end if not dates[1] then return message(getopt.missing1 or 'mt-need-valid-ymd') end if getopt.single then return dates[1] end if not dates[2] then return message(getopt.missing2 or 'mt-need-valid-ymd2') end return dates[1], dates[2] end local function ageGeneric(frame) -- Return the result required by the specified template. -- Can use sortable=x where x = on/table/off/debug in any supported template. -- Some templates default to sortable=on but can be overridden. local name = frame.args.template if not name then return message('mt-template-x') end local args = frame:getParent().args local specs = { age_days = { -- {{age in days}} show = 'd', disp = 'disp_raw', }, age_days_nts = { -- {{age in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', }, duration_days = { -- {{duration in days}} show = 'd', disp = 'disp_raw', duration = true, }, duration_days_nts = { -- {{duration in days nts}} show = 'd', disp = 'disp_raw', format = 'format_commas', sortable = 'on', duration = true, }, age_full_years = { -- {{age}} show = 'y', abbr = 'abbr_raw', flag = 'usesCurrent', omitZero = true, range = 'dash', }, age_full_years_nts = { -- {{age nts}} show = 'y', abbr = 'abbr_raw', format = 'format_commas', sortable = 'on', }, age_in_years = { -- {{age in years}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', }, age_in_years_nts = { -- {{age in years nts}} show = 'y', abbr = 'abbr_raw', negative = 'error', range = 'dash', format = 'format_commas', sortable = 'on', }, age_infant = { -- {{age for infant}} -- Do not set show because special processing is done later. abbr = yes(args.abbr) and 'abbr_infant' or 'abbr_off', disp = 'disp_age', sep = 'sep_space', sortable = 'on', }, age_m = { -- {{age in months}} show = 'm', disp = 'disp_raw', }, age_w = { -- {{age in weeks}} show = 'w', disp = 'disp_raw', }, age_wd = { -- {{age in weeks and days}} show = 'wd', }, age_yd = { -- {{age in years and days}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, }, age_yd_nts = { -- {{age in years and days nts}} show = 'yd', format = 'format_commas', sep = args.sep ~= 'and' and 'sep_comma' or nil, sortable = 'on', }, age_ym = { -- {{age in years and months}} show = 'ym', sep = 'sep_comma', }, age_ymd = { -- {{age in years, months and days}} show = 'ymd', range = true, }, age_ymwd = { -- {{age in years, months, weeks and days}} show = 'ymwd', wantMixture = true, }, } local spec = specs[name] if not spec then return message('mt-template-bad-name') end if name == 'age_days' then local su = stripToNil(args['show unit']) if su then if su == 'abbr' or su == 'full' then spec.disp = nil spec.abbr = su == 'abbr' and 'abbr_on' or nil end end end local partial, autofill local range = stripToNil(args.range) or spec.range if range then -- Suppose partial dates are used and age could be 11 or 12 years. -- "|range=" (empty value) has no effect (spec is used). -- "|range=yes" or spec.range == true sets range = true (gives "11 or 12") -- "|range=dash" or spec.range == 'dash' sets range = 'dash' (gives "11–12"). -- "|range=no" or spec.range == 'no' sets range = nil and fills each date in the diff (gives "12"). -- ("on" is equivalent to "yes", and "off" is equivalent to "no"). -- "|range=OTHER" sets range = nil and rejects partial dates. range = ({ dash = 'dash', off = 'no', no = 'no', [true] = true })[range] or yes(range) if range then partial = true -- accept partial dates with a possible age range for the result if range == 'no' then autofill = true -- missing month/day in first or second date are filled from other date or 1 range = nil end end end local getopt = { fix = yes(args.fix), flag = stripToNil(args.flag) or spec.flag, omitZero = spec.omitZero, partial = partial, wantMixture = spec.wantMixture, } local date1, date2 = getDates(frame, getopt) if type(date1) == 'string' then return date1 end local format = stripToNil(args.format) local spell = spellOptions[format] if format then format = 'format_' .. format elseif name == 'age_days' and getopt.textdates then format = 'format_commas' end local parms = { diff = date2:subtract(date1, { fill = autofill }), wantDuration = spec.duration or yes(args.duration), range = range, wantSc = yes(args.sc), show = args.show == 'hide' and 'hide' or spec.show, abbr = spec.abbr, disp = spec.disp, extra = makeExtra(args, getopt.usesCurrent and format ~= 'format_raw'), format = format or spec.format, round = yes(args.round), sep = spec.sep, sortable = translateParameters.sortable[args.sortable or spec.sortable], spell = spell, } if (spec.negative or frame.args.negative) == 'error' and parms.diff.isnegative then return message('mt-date-wrong-order') end return from_en(dateDifference(parms)) end local function isFake(args) -- Some templates have TemplateData with an auto value like "{{Birth date and age|YYYY|MM|DD}}". -- Return true if that appears to be the case so the caller can output nothing rather than an error. return args[1] == 'YYYY' end local function bda(frame) -- Implement [[Template:Birth date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-bd', noMissing = true, single = true, } local date = getDates(frame, options) if type(date) == 'string' then return date -- error text end local Date = getExports(frame) local diff = Date('currentdate') - date if diff.isnegative or diff.years > 150 then return message('mt-invalid-bd-age') end local disp = mtext['txt-bda-disp'] local show = 'y' if diff.years < 2 then disp = 'disp_age' if diff.years == 0 and diff.months == 0 then show = 'd' else show = 'm' end end local result = substituteParameters( mtext['txt-bda'], date:text('%-Y-%m-%d'), from_en(date:text(dateFormat(args))), from_en(dateDifference({ diff = diff, show = show, abbr = 'abbr_off', disp = disp, sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, day = true, day1 = true, month = true, month1 = true, year = true, year1 = true, } local invalid local imax = options.textdates and 1 or 3 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dda(frame) -- Implement [[Template:Death date and age]]. local args = frame:getParent().args if isFake(args) then return '' end local options = { missing1 = 'mt-need-valid-dd', missing2 = 'mt-need-valid-bd2', noMissing = true, partial = true, } local date1, date2 = getDates(frame, options) if type(date1) == 'string' then return date1 end local diff = date1 - date2 if diff.isnegative then return message('mt-dd-wrong-order') end local Date = getExports(frame) local today = Date('currentdate') + 1 -- one day in future allows for timezones if date1 > today then return message('mt-dd-future') end local years if diff.partial then years = diff.partial.years years = type(years) == 'table' and years[2] or years else years = diff.years end if years > 150 then return message('mt-invalid-dates-age') end local fmt_date, fmt_ymd if date1.day then -- y, m, d known fmt_date = dateFormat(args) fmt_ymd = '%-Y-%m-%d' elseif date1.month then -- y, m known; d unknown fmt_date = '%B %-Y' fmt_ymd = '%-Y-%m-00' else -- y known; m, d unknown fmt_date = '%-Y' fmt_ymd = '%-Y-00-00' end local sortKey local sortable = translateParameters.sortable[args.sortable] if sortable then local value = (date1.partial and date1.partial.first or date1).jdz sortKey = makeSort(value, sortable) end local result = (sortKey or '') .. substituteParameters( mtext['txt-dda'], date1:text(fmt_ymd), from_en(date1:text(fmt_date)), from_en(dateDifference({ diff = diff, show = 'y', abbr = 'abbr_off', disp = mtext['txt-dda-disp'], range = 'dash', sep = 'sep_space', })) ) local warnings = tonumber(frame.args.warnings) if warnings and warnings > 0 then local good = { df = true, mf = true, } local invalid local imax = options.textdates and 2 or 6 for k, _ in pairs(args) do if type(k) == 'number' then if k > imax then invalid = tostring(k) break end else if not good[k] then invalid = k break end end end if invalid then result = result .. message('mt-bad-param1', invalid) end end return result end local function dateToGsd(frame) -- Implement [[Template:Gregorian serial date]]. -- Return Gregorian serial date of the given date, or the current date. -- The returned value is negative for dates before 1 January 1 AD -- despite the fact that GSD is not defined for such dates. local date = getDates(frame, { wantMixture=true, single=true }) if type(date) == 'string' then return date end return tostring(date.gsd) end local function jdToDate(frame) -- Return formatted date from a Julian date. -- The result includes a time if the input includes a fraction. -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date('juliandate', args[1], args[2]) if date then return from_en(date:text()) end return message('mt-need-jdn') end local function dateToJd(frame) -- Return Julian date (a number) from a date which may include a time, -- or the current date ('currentdate') or current date and time ('currentdatetime'). -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date = Date(args[1], args[2], args[3], args[4], args[5], args[6], args[7]) if date then return tostring(date.jd) end return message('mt-need-valid-ymd-current') end local function timeInterval(frame) -- Implement [[Template:Time interval]]. -- There are two positional arguments: date1, date2. -- The default for each is the current date and time. -- Result is date2 - date1 formatted. local Date = getExports(frame) local args = frame:getParent().args local parms = { extra = makeExtra(args), wantDuration = yes(args.duration), range = yes(args.range) or (args.range == 'dash' and 'dash' or nil), wantSc = yes(args.sc), } local fix = yes(args.fix) and 'fix' or '' local date1 = Date(fix, 'partial', stripToNil(args[1]) or 'currentdatetime') if not date1 then return message('mt-invalid-start') end local date2 = Date(fix, 'partial', stripToNil(args[2]) or 'currentdatetime') if not date2 then return message('mt-invalid-end') end parms.diff = date2 - date1 for argname, translate in pairs(translateParameters) do local parm = stripToNil(args[argname]) if parm then parm = translate[parm] if parm == nil then -- test for nil because false is a valid setting return message('mt-bad-param2', argname, args[argname]) end parms[argname] = parm end end if parms.round then local round = parms.round local show = parms.show if round ~= 'on' then if show then if show.id ~= round then return message('mt-conflicting-show', args.show, args.round) end else parms.show = translateParameters.show[round] end end parms.round = true end return from_en(dateDifference(parms)) end return { age_generic = ageGeneric, -- can emulate several age templates birth_date_and_age = bda, -- Template:Birth_date_and_age death_date_and_age = dda, -- Template:Death_date_and_age gsd = dateToGsd, -- Template:Gregorian_serial_date extract = dateExtract, -- Template:Extract jd_to_date = jdToDate, -- Template:? JULIANDAY = dateToJd, -- Template:JULIANDAY time_interval = timeInterval, -- Template:Time_interval } 6ca69a24c5aa2fa9bbb155bb2a123314feea53e0 Module:Date 828 455 925 924 2024-03-16T10:46:32Z Motzoid India 2 1 revision imported Scribunto text/plain -- Date functions for use by other modules. -- I18N and time zones are not supported. local MINUS = '−' -- Unicode U+2212 MINUS SIGN local floor = math.floor local Date, DateDiff, diffmt -- forward declarations local uniq = { 'unique identifier' } local function is_date(t) -- The system used to make a date read-only means there is no unique -- metatable that is conveniently accessible to check. return type(t) == 'table' and t._id == uniq end local function is_diff(t) return type(t) == 'table' and getmetatable(t) == diffmt end local function _list_join(list, sep) return table.concat(list, sep) end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, join = _list_join, } end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when Date fields are provided from -- another module which may pass a string, a number, or another type). if type(text) == 'string' then text = text:match('(%S.-)%s*$') end return text end local function is_leap_year(year, calname) -- Return true if year is a leap year. if calname == 'Julian' then return year % 4 == 0 end return (year % 4 == 0 and year % 100 ~= 0) or year % 400 == 0 end local function days_in_month(year, month, calname) -- Return number of days (1..31) in given month (1..12). if month == 2 and is_leap_year(year, calname) then return 29 end return ({ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 })[month] end local function h_m_s(time) -- Return hour, minute, second extracted from fraction of a day. time = floor(time * 24 * 3600 + 0.5) -- number of seconds local second = time % 60 time = floor(time / 60) return floor(time / 60), time % 60, second end local function hms(date) -- Return fraction of a day from date's time, where (0 <= fraction < 1) -- if the values are valid, but could be anything if outside range. return (date.hour + (date.minute + date.second / 60) / 60) / 24 end local function julian_date(date) -- Return jd, jdz from a Julian or Gregorian calendar date where -- jd = Julian date and its fractional part is zero at noon -- jdz = same, but assume time is 00:00:00 if no time given -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- Testing shows this works for all dates from year -9999 to 9999! -- JDN 0 is the 24-hour period starting at noon UTC on Monday -- 1 January 4713 BC = (-4712, 1, 1) Julian calendar -- 24 November 4714 BC = (-4713, 11, 24) Gregorian calendar local offset local a = floor((14 - date.month)/12) local y = date.year + 4800 - a if date.calendar == 'Julian' then offset = floor(y/4) - 32083 else offset = floor(y/4) - floor(y/100) + floor(y/400) - 32045 end local m = date.month + 12*a - 3 local jd = date.day + floor((153*m + 2)/5) + 365*y + offset if date.hastime then jd = jd + hms(date) - 0.5 return jd, jd end return jd, jd - 0.5 end local function set_date_from_jd(date) -- Set the fields of table date from its Julian date field. -- Return true if date is valid. -- http://www.tondering.dk/claus/cal/julperiod.php#formula -- This handles the proleptic Julian and Gregorian calendars. -- Negative Julian dates are not defined but they work. local calname = date.calendar local low, high -- min/max limits for date ranges −9999-01-01 to 9999-12-31 if calname == 'Gregorian' then low, high = -1930999.5, 5373484.49999 elseif calname == 'Julian' then low, high = -1931076.5, 5373557.49999 else return end local jd = date.jd if not (type(jd) == 'number' and low <= jd and jd <= high) then return end local jdn = floor(jd) if date.hastime then local time = jd - jdn -- 0 <= time < 1 if time >= 0.5 then -- if at or after midnight of next day jdn = jdn + 1 time = time - 0.5 else time = time + 0.5 end date.hour, date.minute, date.second = h_m_s(time) else date.second = 0 date.minute = 0 date.hour = 0 end local b, c if calname == 'Julian' then b = 0 c = jdn + 32082 else -- Gregorian local a = jdn + 32044 b = floor((4*a + 3)/146097) c = a - floor(146097*b/4) end local d = floor((4*c + 3)/1461) local e = c - floor(1461*d/4) local m = floor((5*e + 2)/153) date.day = e - floor((153*m + 2)/5) + 1 date.month = m + 3 - 12*floor(m/10) date.year = 100*b + d - 4800 + floor(m/10) return true end local function fix_numbers(numbers, y, m, d, H, M, S, partial, hastime, calendar) -- Put the result of normalizing the given values in table numbers. -- The result will have valid m, d values if y is valid; caller checks y. -- The logic of PHP mktime is followed where m or d can be zero to mean -- the previous unit, and -1 is the one before that, etc. -- Positive values carry forward. local date if not (1 <= m and m <= 12) then date = Date(y, 1, 1) if not date then return end date = date + ((m - 1) .. 'm') y, m = date.year, date.month end local days_hms if not partial then if hastime and H and M and S then if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then days_hms = hms({ hour = H, minute = M, second = S }) end end if days_hms or not (1 <= d and d <= days_in_month(y, m, calendar)) then date = date or Date(y, m, 1) if not date then return end date = date + (d - 1 + (days_hms or 0)) y, m, d = date.year, date.month, date.day if days_hms then H, M, S = date.hour, date.minute, date.second end end end numbers.year = y numbers.month = m numbers.day = d if days_hms then -- Don't set H unless it was valid because a valid H will set hastime. numbers.hour = H numbers.minute = M numbers.second = S end end local function set_date_from_numbers(date, numbers, options) -- Set the fields of table date from numeric values. -- Return true if date is valid. if type(numbers) ~= 'table' then return end local y = numbers.year or date.year local m = numbers.month or date.month local d = numbers.day or date.day local H = numbers.hour local M = numbers.minute or date.minute or 0 local S = numbers.second or date.second or 0 local need_fix if y and m and d then date.partial = nil if not (-9999 <= y and y <= 9999 and 1 <= m and m <= 12 and 1 <= d and d <= days_in_month(y, m, date.calendar)) then if not date.want_fix then return end need_fix = true end elseif y and date.partial then if d or not (-9999 <= y and y <= 9999) then return end if m and not (1 <= m and m <= 12) then if not date.want_fix then return end need_fix = true end else return end if date.partial then H = nil -- ignore any time M = nil S = nil else if H then -- It is not possible to set M or S without also setting H. date.hastime = true else H = 0 end if not (0 <= H and H <= 23 and 0 <= M and M <= 59 and 0 <= S and S <= 59) then if date.want_fix then need_fix = true else return end end end date.want_fix = nil if need_fix then fix_numbers(numbers, y, m, d, H, M, S, date.partial, date.hastime, date.calendar) return set_date_from_numbers(date, numbers, options) end date.year = y -- -9999 to 9999 ('n BC' → year = 1 - n) date.month = m -- 1 to 12 (may be nil if partial) date.day = d -- 1 to 31 (* = nil if partial) date.hour = H -- 0 to 59 (*) date.minute = M -- 0 to 59 (*) date.second = S -- 0 to 59 (*) if type(options) == 'table' then for _, k in ipairs({ 'am', 'era', 'format' }) do if options[k] then date.options[k] = options[k] end end end return true end local function make_option_table(options1, options2) -- If options1 is a string, return a table with its settings, or -- if it is a table, use its settings. -- Missing options are set from table options2 or defaults. -- If a default is used, a flag is set so caller knows the value was not intentionally set. -- Valid option settings are: -- am: 'am', 'a.m.', 'AM', 'A.M.' -- 'pm', 'p.m.', 'PM', 'P.M.' (each has same meaning as corresponding item above) -- era: 'BCMINUS', 'BCNEGATIVE', 'BC', 'B.C.', 'BCE', 'B.C.E.', 'AD', 'A.D.', 'CE', 'C.E.' -- Option am = 'am' does not mean the hour is AM; it means 'am' or 'pm' is used, depending on the hour, -- and am = 'pm' has the same meaning. -- Similarly, era = 'BC' means 'BC' is used if year <= 0. -- BCMINUS displays a MINUS if year < 0 and the display format does not include %{era}. -- BCNEGATIVE is similar but displays a hyphen. local result = { bydefault = {} } if type(options1) == 'table' then result.am = options1.am result.era = options1.era elseif type(options1) == 'string' then -- Example: 'am:AM era:BC' or 'am=AM era=BC'. for item in options1:gmatch('%S+') do local lhs, rhs = item:match('^(%w+)[:=](.+)$') if lhs then result[lhs] = rhs end end end options2 = type(options2) == 'table' and options2 or {} local defaults = { am = 'am', era = 'BC' } for k, v in pairs(defaults) do if not result[k] then if options2[k] then result[k] = options2[k] else result[k] = v result.bydefault[k] = true end end end return result end local ampm_options = { -- lhs = input text accepted as an am/pm option -- rhs = code used internally ['am'] = 'am', ['AM'] = 'AM', ['a.m.'] = 'a.m.', ['A.M.'] = 'A.M.', ['pm'] = 'am', -- same as am ['PM'] = 'AM', ['p.m.'] = 'a.m.', ['P.M.'] = 'A.M.', } local era_text = { -- Text for displaying an era with a positive year (after adjusting -- by replacing year with 1 - year if date.year <= 0). -- options.era = { year<=0 , year>0 } ['BCMINUS'] = { 'BC' , '' , isbc = true, sign = MINUS }, ['BCNEGATIVE'] = { 'BC' , '' , isbc = true, sign = '-' }, ['BC'] = { 'BC' , '' , isbc = true }, ['B.C.'] = { 'B.C.' , '' , isbc = true }, ['BCE'] = { 'BCE' , '' , isbc = true }, ['B.C.E.'] = { 'B.C.E.', '' , isbc = true }, ['AD'] = { 'BC' , 'AD' }, ['A.D.'] = { 'B.C.' , 'A.D.' }, ['CE'] = { 'BCE' , 'CE' }, ['C.E.'] = { 'B.C.E.', 'C.E.' }, } local function get_era_for_year(era, year) return (era_text[era] or era_text['BC'])[year > 0 and 2 or 1] or '' end local function strftime(date, format, options) -- Return date formatted as a string using codes similar to those -- in the C strftime library function. local sformat = string.format local shortcuts = { ['%c'] = '%-I:%M %p %-d %B %-Y %{era}', -- date and time: 2:30 pm 1 April 2016 ['%x'] = '%-d %B %-Y %{era}', -- date: 1 April 2016 ['%X'] = '%-I:%M %p', -- time: 2:30 pm } if shortcuts[format] then format = shortcuts[format] end local codes = { a = { field = 'dayabbr' }, A = { field = 'dayname' }, b = { field = 'monthabbr' }, B = { field = 'monthname' }, u = { fmt = '%d' , field = 'dowiso' }, w = { fmt = '%d' , field = 'dow' }, d = { fmt = '%02d', fmt2 = '%d', field = 'day' }, m = { fmt = '%02d', fmt2 = '%d', field = 'month' }, Y = { fmt = '%04d', fmt2 = '%d', field = 'year' }, H = { fmt = '%02d', fmt2 = '%d', field = 'hour' }, M = { fmt = '%02d', fmt2 = '%d', field = 'minute' }, S = { fmt = '%02d', fmt2 = '%d', field = 'second' }, j = { fmt = '%03d', fmt2 = '%d', field = 'dayofyear' }, I = { fmt = '%02d', fmt2 = '%d', field = 'hour', special = 'hour12' }, p = { field = 'hour', special = 'am' }, } options = make_option_table(options, date.options) local amopt = options.am local eraopt = options.era local function replace_code(spaces, modifier, id) local code = codes[id] if code then local fmt = code.fmt if modifier == '-' and code.fmt2 then fmt = code.fmt2 end local value = date[code.field] if not value then return nil -- an undefined field in a partial date end local special = code.special if special then if special == 'hour12' then value = value % 12 value = value == 0 and 12 or value elseif special == 'am' then local ap = ({ ['a.m.'] = { 'a.m.', 'p.m.' }, ['AM'] = { 'AM', 'PM' }, ['A.M.'] = { 'A.M.', 'P.M.' }, })[ampm_options[amopt]] or { 'am', 'pm' } return (spaces == '' and '' or '&nbsp;') .. (value < 12 and ap[1] or ap[2]) end end if code.field == 'year' then local sign = (era_text[eraopt] or {}).sign if not sign or format:find('%{era}', 1, true) then sign = '' if value <= 0 then value = 1 - value end else if value >= 0 then sign = '' else value = -value end end return spaces .. sign .. sformat(fmt, value) end return spaces .. (fmt and sformat(fmt, value) or value) end end local function replace_property(spaces, id) if id == 'era' then -- Special case so can use local era option. local result = get_era_for_year(eraopt, date.year) if result == '' then return '' end return (spaces == '' and '' or '&nbsp;') .. result end local result = date[id] if type(result) == 'string' then return spaces .. result end if type(result) == 'number' then return spaces .. tostring(result) end if type(result) == 'boolean' then return spaces .. (result and '1' or '0') end -- This occurs if id is an undefined field in a partial date, or is the name of a function. return nil end local PERCENT = '\127PERCENT\127' return (format :gsub('%%%%', PERCENT) :gsub('(%s*)%%{(%w+)}', replace_property) :gsub('(%s*)%%(%-?)(%a)', replace_code) :gsub(PERCENT, '%%') ) end local function _date_text(date, fmt, options) -- Return a formatted string representing the given date. if not is_date(date) then error('date:text: need a date (use "date:text()" with a colon)', 2) end if type(fmt) == 'string' and fmt:match('%S') then if fmt:find('%', 1, true) then return strftime(date, fmt, options) end elseif date.partial then fmt = date.month and 'my' or 'y' else fmt = 'dmy' if date.hastime then fmt = (date.second > 0 and 'hms ' or 'hm ') .. fmt end end local function bad_format() -- For consistency with other format processing, return given format -- (or cleaned format if original was not a string) if invalid. return mw.text.nowiki(fmt) end if date.partial then -- Ignore days in standard formats like 'ymd'. if fmt == 'ym' or fmt == 'ymd' then fmt = date.month and '%Y-%m %{era}' or '%Y %{era}' elseif fmt == 'my' or fmt == 'dmy' or fmt == 'mdy' then fmt = date.month and '%B %-Y %{era}' or '%-Y %{era}' elseif fmt == 'y' then fmt = date.month and '%-Y %{era}' or '%-Y %{era}' else return bad_format() end return strftime(date, fmt, options) end local function hm_fmt() local plain = make_option_table(options, date.options).bydefault.am return plain and '%H:%M' or '%-I:%M %p' end local need_time = date.hastime local t = collection() for item in fmt:gmatch('%S+') do local f if item == 'hm' then f = hm_fmt() need_time = false elseif item == 'hms' then f = '%H:%M:%S' need_time = false elseif item == 'ymd' then f = '%Y-%m-%d %{era}' elseif item == 'mdy' then f = '%B %-d, %-Y %{era}' elseif item == 'dmy' then f = '%-d %B %-Y %{era}' else return bad_format() end t:add(f) end fmt = t:join(' ') if need_time then fmt = hm_fmt() .. ' ' .. fmt end return strftime(date, fmt, options) end local day_info = { -- 0=Sun to 6=Sat [0] = { 'Sun', 'Sunday' }, { 'Mon', 'Monday' }, { 'Tue', 'Tuesday' }, { 'Wed', 'Wednesday' }, { 'Thu', 'Thursday' }, { 'Fri', 'Friday' }, { 'Sat', 'Saturday' }, } local month_info = { -- 1=Jan to 12=Dec { 'Jan', 'January' }, { 'Feb', 'February' }, { 'Mar', 'March' }, { 'Apr', 'April' }, { 'May', 'May' }, { 'Jun', 'June' }, { 'Jul', 'July' }, { 'Aug', 'August' }, { 'Sep', 'September' }, { 'Oct', 'October' }, { 'Nov', 'November' }, { 'Dec', 'December' }, } local function name_to_number(text, translate) if type(text) == 'string' then return translate[text:lower()] end end local function day_number(text) return name_to_number(text, { sun = 0, sunday = 0, mon = 1, monday = 1, tue = 2, tuesday = 2, wed = 3, wednesday = 3, thu = 4, thursday = 4, fri = 5, friday = 5, sat = 6, saturday = 6, }) end local function month_number(text) return name_to_number(text, { jan = 1, january = 1, feb = 2, february = 2, mar = 3, march = 3, apr = 4, april = 4, may = 5, jun = 6, june = 6, jul = 7, july = 7, aug = 8, august = 8, sep = 9, september = 9, sept = 9, oct = 10, october = 10, nov = 11, november = 11, dec = 12, december = 12, }) end local function _list_text(list, fmt) -- Return a list of formatted strings from a list of dates. if not type(list) == 'table' then error('date:list:text: need "list:text()" with a colon', 2) end local result = { join = _list_join } for i, date in ipairs(list) do result[i] = date:text(fmt) end return result end local function _date_list(date, spec) -- Return a possibly empty numbered table of dates meeting the specification. -- Dates in the list are in ascending order (oldest date first). -- The spec should be a string of form "<count> <day> <op>" -- where each item is optional and -- count = number of items wanted in list -- day = abbreviation or name such as Mon or Monday -- op = >, >=, <, <= (default is > meaning after date) -- If no count is given, the list is for the specified days in date's month. -- The default day is date's day. -- The spec can also be a positive or negative number: -- -5 is equivalent to '5 <' -- 5 is equivalent to '5' which is '5 >' if not is_date(date) then error('date:list: need a date (use "date:list()" with a colon)', 2) end local list = { text = _list_text } if date.partial then return list end local count, offset, operation local ops = { ['>='] = { before = false, include = true }, ['>'] = { before = false, include = false }, ['<='] = { before = true , include = true }, ['<'] = { before = true , include = false }, } if spec then if type(spec) == 'number' then count = floor(spec + 0.5) if count < 0 then count = -count operation = ops['<'] end elseif type(spec) == 'string' then local num, day, op = spec:match('^%s*(%d*)%s*(%a*)%s*([<>=]*)%s*$') if not num then return list end if num ~= '' then count = tonumber(num) end if day ~= '' then local dow = day_number(day:gsub('[sS]$', '')) -- accept plural days if not dow then return list end offset = dow - date.dow end operation = ops[op] else return list end end offset = offset or 0 operation = operation or ops['>'] local datefrom, dayfirst, daylast if operation.before then if offset > 0 or (offset == 0 and not operation.include) then offset = offset - 7 end if count then if count > 1 then offset = offset - 7*(count - 1) end datefrom = date + offset else daylast = date.day + offset dayfirst = daylast % 7 if dayfirst == 0 then dayfirst = 7 end end else if offset < 0 or (offset == 0 and not operation.include) then offset = offset + 7 end if count then datefrom = date + offset else dayfirst = date.day + offset daylast = date.monthdays end end if not count then if daylast < dayfirst then return list end count = floor((daylast - dayfirst)/7) + 1 datefrom = Date(date, {day = dayfirst}) end for i = 1, count do if not datefrom then break end -- exceeds date limits list[i] = datefrom datefrom = datefrom + 7 end return list end -- A table to get the current date/time (UTC), but only if needed. local current = setmetatable({}, { __index = function (self, key) local d = os.date('!*t') self.year = d.year self.month = d.month self.day = d.day self.hour = d.hour self.minute = d.min self.second = d.sec return rawget(self, key) end }) local function extract_date(newdate, text) -- Parse the date/time in text and return n, o where -- n = table of numbers with date/time fields -- o = table of options for AM/PM or AD/BC or format, if any -- or return nothing if date is known to be invalid. -- Caller determines if the values in n are valid. -- A year must be positive ('1' to '9999'); use 'BC' for BC. -- In a y-m-d string, the year must be four digits to avoid ambiguity -- ('0001' to '9999'). The only way to enter year <= 0 is by specifying -- the date as three numeric parameters like ymd Date(-1, 1, 1). -- Dates of form d/m/y, m/d/y, y/m/d are rejected as potentially ambiguous. local date, options = {}, {} if text:sub(-1) == 'Z' then -- Extract date/time from a Wikidata timestamp. -- The year can be 1 to 16 digits but this module handles 1 to 4 digits only. -- Examples: '+2016-06-21T14:30:00Z', '-0000000180-00-00T00:00:00Z'. local sign, y, m, d, H, M, S = text:match('^([+%-])(%d+)%-(%d%d)%-(%d%d)T(%d%d):(%d%d):(%d%d)Z$') if sign then y = tonumber(y) if sign == '-' and y > 0 then y = -y end if y <= 0 then options.era = 'BCE' end date.year = y m = tonumber(m) d = tonumber(d) H = tonumber(H) M = tonumber(M) S = tonumber(S) if m == 0 then newdate.partial = true return date, options end date.month = m if d == 0 then newdate.partial = true return date, options end date.day = d if H > 0 or M > 0 or S > 0 then date.hour = H date.minute = M date.second = S end return date, options end return end local function extract_ymd(item) -- Called when no day or month has been set. local y, m, d = item:match('^(%d%d%d%d)%-(%w+)%-(%d%d?)$') if y then if date.year then return end if m:match('^%d%d?$') then m = tonumber(m) else m = month_number(m) end if m then date.year = tonumber(y) date.month = m date.day = tonumber(d) return true end end end local function extract_day_or_year(item) -- Called when a day would be valid, or -- when a year would be valid if no year has been set and partial is set. local number, suffix = item:match('^(%d%d?%d?%d?)(.*)$') if number then local n = tonumber(number) if #number <= 2 and n <= 31 then suffix = suffix:lower() if suffix == '' or suffix == 'st' or suffix == 'nd' or suffix == 'rd' or suffix == 'th' then date.day = n return true end elseif suffix == '' and newdate.partial and not date.year then date.year = n return true end end end local function extract_month(item) -- A month must be given as a name or abbreviation; a number could be ambiguous. local m = month_number(item) if m then date.month = m return true end end local function extract_time(item) local h, m, s = item:match('^(%d%d?):(%d%d)(:?%d*)$') if date.hour or not h then return end if s ~= '' then s = s:match('^:(%d%d)$') if not s then return end end date.hour = tonumber(h) date.minute = tonumber(m) date.second = tonumber(s) -- nil if empty string return true end local item_count = 0 local index_time local function set_ampm(item) local H = date.hour if H and not options.am and index_time + 1 == item_count then options.am = ampm_options[item] -- caller checked this is not nil if item:match('^[Aa]') then if not (1 <= H and H <= 12) then return end if H == 12 then date.hour = 0 end else if not (1 <= H and H <= 23) then return end if H <= 11 then date.hour = H + 12 end end return true end end for item in text:gsub(',', ' '):gsub('&nbsp;', ' '):gmatch('%S+') do item_count = item_count + 1 if era_text[item] then -- Era is accepted in peculiar places. if options.era then return end options.era = item elseif ampm_options[item] then if not set_ampm(item) then return end elseif item:find(':', 1, true) then if not extract_time(item) then return end index_time = item_count elseif date.day and date.month then if date.year then return -- should be nothing more so item is invalid end if not item:match('^(%d%d?%d?%d?)$') then return end date.year = tonumber(item) elseif date.day then if not extract_month(item) then return end elseif date.month then if not extract_day_or_year(item) then return end elseif extract_month(item) then options.format = 'mdy' elseif extract_ymd(item) then options.format = 'ymd' elseif extract_day_or_year(item) then if date.day then options.format = 'dmy' end else return end end if not date.year or date.year == 0 then return end local era = era_text[options.era] if era and era.isbc then date.year = 1 - date.year end return date, options end local function autofill(date1, date2) -- Fill any missing month or day in each date using the -- corresponding component from the other date, if present, -- or with 1 if both dates are missing the month or day. -- This gives a good result for calculating the difference -- between two partial dates when no range is wanted. -- Return filled date1, date2 (two full dates). local function filled(a, b) -- Return date a filled, if necessary, with month and/or day from date b. -- The filled day is truncated to fit the number of days in the month. local fillmonth, fillday if not a.month then fillmonth = b.month or 1 end if not a.day then fillday = b.day or 1 end if fillmonth or fillday then -- need to create a new date a = Date(a, { month = fillmonth, day = math.min(fillday or a.day, days_in_month(a.year, fillmonth or a.month, a.calendar)) }) end return a end return filled(date1, date2), filled(date2, date1) end local function date_add_sub(lhs, rhs, is_sub) -- Return a new date from calculating (lhs + rhs) or (lhs - rhs), -- or return nothing if invalid. -- The result is nil if the calculated date exceeds allowable limits. -- Caller ensures that lhs is a date; its properties are copied for the new date. if lhs.partial then -- Adding to a partial is not supported. -- Can subtract a date or partial from a partial, but this is not called for that. return end local function is_prefix(text, word, minlen) local n = #text return (minlen or 1) <= n and n <= #word and text == word:sub(1, n) end local function do_days(n) local forcetime, jd if floor(n) == n then jd = lhs.jd else forcetime = not lhs.hastime jd = lhs.jdz end jd = jd + (is_sub and -n or n) if forcetime then jd = tostring(jd) if not jd:find('.', 1, true) then jd = jd .. '.0' end end return Date(lhs, 'juliandate', jd) end if type(rhs) == 'number' then -- Add/subtract days, including fractional days. return do_days(rhs) end if type(rhs) == 'string' then -- rhs is a single component like '26m' or '26 months' (with optional sign). -- Fractions like '3.25d' are accepted for the units which are handled as days. local sign, numstr, id = rhs:match('^%s*([+-]?)([%d%.]+)%s*(%a+)$') if sign then if sign == '-' then is_sub = not (is_sub and true or false) end local y, m, days local num = tonumber(numstr) if not num then return end id = id:lower() if is_prefix(id, 'years') then y = num m = 0 elseif is_prefix(id, 'months') then y = floor(num / 12) m = num % 12 elseif is_prefix(id, 'weeks') then days = num * 7 elseif is_prefix(id, 'days') then days = num elseif is_prefix(id, 'hours') then days = num / 24 elseif is_prefix(id, 'minutes', 3) then days = num / (24 * 60) elseif is_prefix(id, 'seconds') then days = num / (24 * 3600) else return end if days then return do_days(days) end if numstr:find('.', 1, true) then return end if is_sub then y = -y m = -m end assert(-11 <= m and m <= 11) y = lhs.year + y m = lhs.month + m if m > 12 then y = y + 1 m = m - 12 elseif m < 1 then y = y - 1 m = m + 12 end local d = math.min(lhs.day, days_in_month(y, m, lhs.calendar)) return Date(lhs, y, m, d) end end if is_diff(rhs) then local days = rhs.age_days if (is_sub or false) ~= (rhs.isnegative or false) then days = -days end return lhs + days end end local full_date_only = { dayabbr = true, dayname = true, dow = true, dayofweek = true, dowiso = true, dayofweekiso = true, dayofyear = true, gsd = true, juliandate = true, jd = true, jdz = true, jdnoon = true, } -- Metatable for a date's calculated fields. local datemt = { __index = function (self, key) if rawget(self, 'partial') then if full_date_only[key] then return end if key == 'monthabbr' or key == 'monthdays' or key == 'monthname' then if not self.month then return end end end local value if key == 'dayabbr' then value = day_info[self.dow][1] elseif key == 'dayname' then value = day_info[self.dow][2] elseif key == 'dow' then value = (self.jdnoon + 1) % 7 -- day-of-week 0=Sun to 6=Sat elseif key == 'dayofweek' then value = self.dow elseif key == 'dowiso' then value = (self.jdnoon % 7) + 1 -- ISO day-of-week 1=Mon to 7=Sun elseif key == 'dayofweekiso' then value = self.dowiso elseif key == 'dayofyear' then local first = Date(self.year, 1, 1, self.calendar).jdnoon value = self.jdnoon - first + 1 -- day-of-year 1 to 366 elseif key == 'era' then -- Era text (never a negative sign) from year and options. value = get_era_for_year(self.options.era, self.year) elseif key == 'format' then value = self.options.format or 'dmy' elseif key == 'gsd' then -- GSD = 1 from 00:00:00 to 23:59:59 on 1 January 1 AD Gregorian calendar, -- which is from jd 1721425.5 to 1721426.49999. value = floor(self.jd - 1721424.5) elseif key == 'juliandate' or key == 'jd' or key == 'jdz' then local jd, jdz = julian_date(self) rawset(self, 'juliandate', jd) rawset(self, 'jd', jd) rawset(self, 'jdz', jdz) return key == 'jdz' and jdz or jd elseif key == 'jdnoon' then -- Julian date at noon (an integer) on the calendar day when jd occurs. value = floor(self.jd + 0.5) elseif key == 'isleapyear' then value = is_leap_year(self.year, self.calendar) elseif key == 'monthabbr' then value = month_info[self.month][1] elseif key == 'monthdays' then value = days_in_month(self.year, self.month, self.calendar) elseif key == 'monthname' then value = month_info[self.month][2] end if value ~= nil then rawset(self, key, value) return value end end, } -- Date operators. local function mt_date_add(lhs, rhs) if not is_date(lhs) then lhs, rhs = rhs, lhs -- put date on left (it must be a date for this to have been called) end return date_add_sub(lhs, rhs) end local function mt_date_sub(lhs, rhs) if is_date(lhs) then if is_date(rhs) then return DateDiff(lhs, rhs) end return date_add_sub(lhs, rhs, true) end end local function mt_date_concat(lhs, rhs) return tostring(lhs) .. tostring(rhs) end local function mt_date_tostring(self) return self:text() end local function mt_date_eq(lhs, rhs) -- Return true if dates identify same date/time where, for example, -- Date(-4712, 1, 1, 'Julian') == Date(-4713, 11, 24, 'Gregorian') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. -- The months may both be nil, but must be the same. return lhs.year == rhs.year and lhs.month == rhs.month and lhs.calendar == rhs.calendar end return lhs.jdz == rhs.jdz end local function mt_date_lt(lhs, rhs) -- Return true if lhs < rhs, for example, -- Date('1 Jan 2016') < Date('06:00 1 Jan 2016') is true. -- This is called only if lhs and rhs have the same type and the same metamethod. if lhs.partial or rhs.partial then -- One date is partial; the other is a partial or a full date. if lhs.calendar ~= rhs.calendar then return lhs.calendar == 'Julian' end if lhs.partial then lhs = lhs.partial.first end if rhs.partial then rhs = rhs.partial.first end end return lhs.jdz < rhs.jdz end --[[ Examples of syntax to construct a date: Date(y, m, d, 'julian') default calendar is 'gregorian' Date(y, m, d, H, M, S, 'julian') Date('juliandate', jd, 'julian') if jd contains "." text output includes H:M:S Date('currentdate') Date('currentdatetime') Date('1 April 1995', 'julian') parse date from text Date('1 April 1995 AD', 'julian') using an era sets a flag to do the same for output Date('04:30:59 1 April 1995', 'julian') Date(date) copy of an existing date Date(date, t) same, updated with y,m,d,H,M,S fields from table t Date(t) date with y,m,d,H,M,S fields from table t ]] function Date(...) -- for forward declaration above -- Return a table holding a date assuming a uniform calendar always applies -- (proleptic Gregorian calendar or proleptic Julian calendar), or -- return nothing if date is invalid. -- A partial date has a valid year, however its month may be nil, and -- its day and time fields are nil. -- Field partial is set to false (if a full date) or a table (if a partial date). local calendars = { julian = 'Julian', gregorian = 'Gregorian' } local newdate = { _id = uniq, calendar = 'Gregorian', -- default is Gregorian calendar hastime = false, -- true if input sets a time hour = 0, -- always set hour/minute/second so don't have to handle nil minute = 0, second = 0, options = {}, list = _date_list, subtract = function (self, rhs, options) return DateDiff(self, rhs, options) end, text = _date_text, } local argtype, datetext, is_copy, jd_number, tnums local numindex = 0 local numfields = { 'year', 'month', 'day', 'hour', 'minute', 'second' } local numbers = {} for _, v in ipairs({...}) do v = strip_to_nil(v) local vlower = type(v) == 'string' and v:lower() or nil if v == nil then -- Ignore empty arguments after stripping so modules can directly pass template parameters. elseif calendars[vlower] then newdate.calendar = calendars[vlower] elseif vlower == 'partial' then newdate.partial = true elseif vlower == 'fix' then newdate.want_fix = true elseif is_date(v) then -- Copy existing date (items can be overridden by other arguments). if is_copy or tnums then return end is_copy = true newdate.calendar = v.calendar newdate.partial = v.partial newdate.hastime = v.hastime newdate.options = v.options newdate.year = v.year newdate.month = v.month newdate.day = v.day newdate.hour = v.hour newdate.minute = v.minute newdate.second = v.second elseif type(v) == 'table' then if tnums then return end tnums = {} local tfields = { year=1, month=1, day=1, hour=2, minute=2, second=2 } for tk, tv in pairs(v) do if tfields[tk] then tnums[tk] = tonumber(tv) end if tfields[tk] == 2 then newdate.hastime = true end end else local num = tonumber(v) if not num and argtype == 'setdate' and numindex == 1 then num = month_number(v) end if num then if not argtype then argtype = 'setdate' end if argtype == 'setdate' and numindex < 6 then numindex = numindex + 1 numbers[numfields[numindex]] = num elseif argtype == 'juliandate' and not jd_number then jd_number = num if type(v) == 'string' then if v:find('.', 1, true) then newdate.hastime = true end elseif num ~= floor(num) then -- The given value was a number. The time will be used -- if the fractional part is nonzero. newdate.hastime = true end else return end elseif argtype then return elseif type(v) == 'string' then if v == 'currentdate' or v == 'currentdatetime' or v == 'juliandate' then argtype = v else argtype = 'datetext' datetext = v end else return end end end if argtype == 'datetext' then if tnums or not set_date_from_numbers(newdate, extract_date(newdate, datetext)) then return end elseif argtype == 'juliandate' then newdate.partial = nil newdate.jd = jd_number if not set_date_from_jd(newdate) then return end elseif argtype == 'currentdate' or argtype == 'currentdatetime' then newdate.partial = nil newdate.year = current.year newdate.month = current.month newdate.day = current.day if argtype == 'currentdatetime' then newdate.hour = current.hour newdate.minute = current.minute newdate.second = current.second newdate.hastime = true end newdate.calendar = 'Gregorian' -- ignore any given calendar name elseif argtype == 'setdate' then if tnums or not set_date_from_numbers(newdate, numbers) then return end elseif not (is_copy or tnums) then return end if tnums then newdate.jd = nil -- force recalculation in case jd was set before changes from tnums if not set_date_from_numbers(newdate, tnums) then return end end if newdate.partial then local year = newdate.year local month = newdate.month local first = Date(year, month or 1, 1, newdate.calendar) month = month or 12 local last = Date(year, month, days_in_month(year, month), newdate.calendar) newdate.partial = { first = first, last = last } else newdate.partial = false -- avoid index lookup end setmetatable(newdate, datemt) local readonly = {} local mt = { __index = newdate, __newindex = function(t, k, v) error('date.' .. tostring(k) .. ' is read-only', 2) end, __add = mt_date_add, __sub = mt_date_sub, __concat = mt_date_concat, __tostring = mt_date_tostring, __eq = mt_date_eq, __lt = mt_date_lt, } return setmetatable(readonly, mt) end local function _diff_age(diff, code, options) -- Return a tuple of integer values from diff as specified by code, except that -- each integer may be a list of two integers for a diff with a partial date, or -- return nil if the code is not supported. -- If want round, the least significant unit is rounded to nearest whole unit. -- For a duration, an extra day is added. local wantround, wantduration, wantrange if type(options) == 'table' then wantround = options.round wantduration = options.duration wantrange = options.range else wantround = options end if not is_diff(diff) then local f = wantduration and 'duration' or 'age' error(f .. ': need a date difference (use "diff:' .. f .. '()" with a colon)', 2) end if diff.partial then -- Ignore wantround, wantduration. local function choose(v) if type(v) == 'table' then if not wantrange or v[1] == v[2] then -- Example: Date('partial', 2005) - Date('partial', 2001) gives -- diff.years = { 3, 4 } to show the range of possible results. -- If do not want a range, choose the second value as more expected. return v[2] end end return v end if code == 'ym' or code == 'ymd' then if not wantrange and diff.iszero then -- This avoids an unexpected result such as -- Date('partial', 2001) - Date('partial', 2001) -- giving diff = { years = 0, months = { 0, 11 } } -- which would be reported as 0 years and 11 months. return 0, 0 end return choose(diff.partial.years), choose(diff.partial.months) end if code == 'y' then return choose(diff.partial.years) end if code == 'm' or code == 'w' or code == 'd' then return choose({ diff.partial.mindiff:age(code), diff.partial.maxdiff:age(code) }) end return nil end local extra_days = wantduration and 1 or 0 if code == 'wd' or code == 'w' or code == 'd' then local offset = wantround and 0.5 or 0 local days = diff.age_days + extra_days if code == 'wd' or code == 'd' then days = floor(days + offset) if code == 'd' then return days end return floor(days/7), days % 7 end return floor(days/7 + offset) end local H, M, S = diff.hours, diff.minutes, diff.seconds if code == 'dh' or code == 'dhm' or code == 'dhms' or code == 'h' or code == 'hm' or code == 'hms' or code == 'M' or code == 's' then local days = floor(diff.age_days + extra_days) local inc_hour if wantround then if code == 'dh' or code == 'h' then if M >= 30 then inc_hour = true end elseif code == 'dhm' or code == 'hm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'M' then if S >= 30 then M = M + 1 end else -- Nothing needed because S is an integer. end if inc_hour then H = H + 1 if H >= 24 then H = 0 days = days + 1 end end end if code == 'dh' or code == 'dhm' or code == 'dhms' then if code == 'dh' then return days, H elseif code == 'dhm' then return days, H, M else return days, H, M, S end end local hours = days * 24 + H if code == 'h' then return hours elseif code == 'hm' then return hours, M elseif code == 'M' or code == 's' then M = hours * 60 + M if code == 'M' then return M end return M * 60 + S end return hours, M, S end if wantround then local inc_hour if code == 'ymdh' or code == 'ymwdh' then if M >= 30 then inc_hour = true end elseif code == 'ymdhm' or code == 'ymwdhm' then if S >= 30 then M = M + 1 if M >= 60 then M = 0 inc_hour = true end end elseif code == 'ymd' or code == 'ymwd' or code == 'yd' or code == 'md' then if H >= 12 then extra_days = extra_days + 1 end end if inc_hour then H = H + 1 if H >= 24 then H = 0 extra_days = extra_days + 1 end end end local y, m, d = diff.years, diff.months, diff.days if extra_days > 0 then d = d + extra_days if d > 28 or code == 'yd' then -- Recalculate in case have passed a month. diff = diff.date1 + extra_days - diff.date2 y, m, d = diff.years, diff.months, diff.days end end if code == 'ymd' then return y, m, d elseif code == 'yd' then if y > 0 then -- It is known that diff.date1 > diff.date2. diff = diff.date1 - (diff.date2 + (y .. 'y')) end return y, floor(diff.age_days) elseif code == 'md' then return y * 12 + m, d elseif code == 'ym' or code == 'm' then if wantround then if d >= 16 then m = m + 1 if m >= 12 then m = 0 y = y + 1 end end end if code == 'ym' then return y, m end return y * 12 + m elseif code == 'ymw' then local weeks = floor(d/7) if wantround then local days = d % 7 if days > 3 or (days == 3 and H >= 12) then weeks = weeks + 1 end end return y, m, weeks elseif code == 'ymwd' then return y, m, floor(d/7), d % 7 elseif code == 'ymdh' then return y, m, d, H elseif code == 'ymwdh' then return y, m, floor(d/7), d % 7, H elseif code == 'ymdhm' then return y, m, d, H, M elseif code == 'ymwdhm' then return y, m, floor(d/7), d % 7, H, M end if code == 'y' then if wantround and m >= 6 then y = y + 1 end return y end return nil end local function _diff_duration(diff, code, options) if type(options) ~= 'table' then options = { round = options } end options.duration = true return _diff_age(diff, code, options) end -- Metatable for some operations on date differences. diffmt = { -- for forward declaration above __concat = function (lhs, rhs) return tostring(lhs) .. tostring(rhs) end, __tostring = function (self) return tostring(self.age_days) end, __index = function (self, key) local value if key == 'age_days' then if rawget(self, 'partial') then local function jdz(date) return (date.partial and date.partial.first or date).jdz end value = jdz(self.date1) - jdz(self.date2) else value = self.date1.jdz - self.date2.jdz end end if value ~= nil then rawset(self, key, value) return value end end, } function DateDiff(date1, date2, options) -- for forward declaration above -- Return a table with the difference between two dates (date1 - date2). -- The difference is negative if date1 is older than date2. -- Return nothing if invalid. -- If d = date1 - date2 then -- date1 = date2 + d -- If date1 >= date2 and the dates have no H:M:S time specified then -- date1 = date2 + (d.years..'y') + (d.months..'m') + d.days -- where the larger time units are added first. -- The result of Date(2015,1,x) + '1m' is Date(2015,2,28) for -- x = 28, 29, 30, 31. That means, for example, -- d = Date(2015,3,3) - Date(2015,1,31) -- gives d.years, d.months, d.days = 0, 1, 3 (excluding date1). if not (is_date(date1) and is_date(date2) and date1.calendar == date2.calendar) then return end local wantfill if type(options) == 'table' then wantfill = options.fill end local isnegative = false local iszero = false if date1 < date2 then isnegative = true date1, date2 = date2, date1 elseif date1 == date2 then iszero = true end -- It is known that date1 >= date2 (period is from date2 to date1). if date1.partial or date2.partial then -- Two partial dates might have timelines: ---------------------A=================B--- date1 is from A to B inclusive --------C=======D-------------------------- date2 is from C to D inclusive -- date1 > date2 iff A > C (date1.partial.first > date2.partial.first) -- The periods can overlap ('April 2001' - '2001'): -------------A===B------------------------- A=2001-04-01 B=2001-04-30 --------C=====================D------------ C=2001-01-01 D=2001-12-31 if wantfill then date1, date2 = autofill(date1, date2) else local function zdiff(date1, date2) local diff = date1 - date2 if diff.isnegative then return date1 - date1 -- a valid diff in case we call its methods end return diff end local function getdate(date, which) return date.partial and date.partial[which] or date end local maxdiff = zdiff(getdate(date1, 'last'), getdate(date2, 'first')) local mindiff = zdiff(getdate(date1, 'first'), getdate(date2, 'last')) local years, months if maxdiff.years == mindiff.years then years = maxdiff.years if maxdiff.months == mindiff.months then months = maxdiff.months else months = { mindiff.months, maxdiff.months } end else years = { mindiff.years, maxdiff.years } end return setmetatable({ date1 = date1, date2 = date2, partial = { years = years, months = months, maxdiff = maxdiff, mindiff = mindiff, }, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end end local y1, m1 = date1.year, date1.month local y2, m2 = date2.year, date2.month local years = y1 - y2 local months = m1 - m2 local d1 = date1.day + hms(date1) local d2 = date2.day + hms(date2) local days, time if d1 >= d2 then days = d1 - d2 else months = months - 1 -- Get days in previous month (before the "to" date) given December has 31 days. local dpm = m1 > 1 and days_in_month(y1, m1 - 1, date1.calendar) or 31 if d2 >= dpm then days = d1 - hms(date2) else days = dpm - d2 + d1 end end if months < 0 then years = years - 1 months = months + 12 end days, time = math.modf(days) local H, M, S = h_m_s(time) return setmetatable({ date1 = date1, date2 = date2, partial = false, -- avoid index lookup years = years, months = months, days = days, hours = H, minutes = M, seconds = S, isnegative = isnegative, iszero = iszero, age = _diff_age, duration = _diff_duration, }, diffmt) end return { _current = current, _Date = Date, _days_in_month = days_in_month, } 48b9402c32798b1e9f91f2ab44283ebda7b53ed9 Module:Navbar 828 456 927 926 2024-03-16T10:46:33Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 047f307758c878eb3e99ed1768cc40920a6ec5fa Module:Navbar/configuration 828 457 929 928 2024-03-16T10:46:33Z Motzoid India 2 1 revision imported Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar/styles.css 828 458 931 930 2024-03-16T10:46:33Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Navbox 828 459 933 932 2024-03-16T10:46:33Z Motzoid India 2 1 revision imported Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Module:Navbox/configuration 828 460 935 934 2024-03-16T10:46:34Z Motzoid India 2 1 revision imported Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbox/styles.css 828 461 937 936 2024-03-16T10:46:34Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Protection banner 828 462 939 938 2024-03-16T10:46:34Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Protection banner/config 828 463 941 940 2024-03-16T10:46:35Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 65de905227752d0a0dae145e9ad8dbe1d0087016 Module:Side box 828 464 943 942 2024-03-16T10:46:35Z Motzoid India 2 1 revision imported Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 096bef4a3721857fc16eb509a4f8d75973484485 Module:Unicode data/scripts 828 465 945 944 2024-03-16T10:46:35Z Motzoid India 2 1 revision imported Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x031EF] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2EBF0, 0x2EE5D, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data 6afbaa9e21efd3898f0ff056b5456c0cd5813400 Template:Anchor 10 466 947 946 2024-03-16T10:46:36Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:anchor|main}}<noinclude> {{Documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 7d65122552007ac959072bddfa6f723296c81998 Template:Ombox 10 467 949 948 2024-03-16T10:46:36Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Template:Trim 10 468 951 950 2024-03-16T10:46:36Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 3d29fbfff9683523147db6e1f55c0e17ed30863b Template:Wdib 10 469 953 952 2024-03-16T10:46:36Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:WikidataIB|getValue}}<noinclude> {{documentation}} </noinclude> fa7d9c2bb5c42c526c39cda90ec66adf62985650 Module:Anchor 828 470 955 954 2024-03-16T10:46:37Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements {{anchor}}. local getArgs = require('Module:Arguments').getArgs local tableTools = require('Module:TableTools') local p = {} function p.main(frame) -- Get the positional arguments from #invoke, remove any nil values, -- and pass them to p._main. local args = getArgs(frame) local argArray = tableTools.compressSparseArray(args) return p._main(unpack(argArray)) end function p._main(...) -- Generate the list of anchors. local anchors = {...} local ret = {} for _, anchor in ipairs(anchors) do ret[#ret + 1] = '<span class="anchor" id="' .. anchor .. '"></span>' end return table.concat(ret) end return p e41d3f5d2f2840528aebb9bac719873540fcb3b8 Module:WikidataIB 828 471 957 956 2024-03-16T10:46:37Z Motzoid India 2 1 revision imported Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, 1, "mul" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end if found then break end end -- loop through fallback table end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- cdfad4f2433151e512d5023478c35bceaf5c980a Module:WikidataIB/nolinks 828 472 959 958 2024-03-16T10:46:37Z Motzoid India 2 1 revision imported Scribunto text/plain local p ={} --[[ The values here are the English sitelinks for items that should not be linked. These 36 are not definitive and may be altered to suit. --]] p.items = { "Australia", "Austria", "Belgium", "Canada", "China", "Denmark", "England", "France", "Germany", "Greece", "Hungary", "Iceland", "India", "Republic of Ireland", "Israel", "Italy", "Jamaica", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Northern Ireland", "Norway", "Poland", "Portugal", "Russia", "Scotland", "South Africa", "Spain", "Sweden", "Switzerland", "Turkey", "United Kingdom", "UK", "United States", "USA", "Wales", } --[[ This provides a convenient way to create a test whether an item is on the list. --]] p.itemsindex = {} for i, v in ipairs(p.items) do p.itemsindex[v] = true end return p d42a1e1cb5d411ab1b578dc0d36aa0266f32b2d6 Module:WikidataIB/titleformats 828 473 961 960 2024-03-16T10:46:38Z Motzoid India 2 1 revision imported Scribunto text/plain --[[ To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. This submodule lists the entity-ids used in 'instance of' (P31), which allows a module to identify the values that should be formatted. The table p.formats is indexed by entity-id, and contains the value " or '' --]] local p = {} p.italics = { "Q571", -- book "Q13593966", -- literary trilogy "Q277759", -- book series "Q2188189", -- musical work "Q11424", -- film "Q13593818", -- film trilogy "Q24856", -- film series "Q5398426", -- television series "Q482994", -- album "Q169930", -- extended play "Q1760610", -- comic book "Q7889", -- video game "Q7058673", -- video game series "Q25379", -- play "Q2743", -- musical "Q37484", -- epic poem "Q41298", -- magazine } p.quotes = { "Q207628", -- musical composition } p.size = 0 p.formats = {} for i, v in ipairs(p.italics) do p.formats[v] = "''" p.size = p.size + 1 end for i, v in ipairs(p.quotes) do p.formats[v] = '"' p.size = p.size + 1 end return p aecc52ff69e56d315f5b60dc21d02dd94a63dfea Template:Side box 10 474 963 962 2024-03-16T10:46:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> f02d48c7bd2f7bc64e2982d16b3578c99137d27e Template:Sister project 10 475 965 964 2024-03-16T10:46:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | wikifunctions = Wikifunctions-logo.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> 9bab46e6907b835c6af71184149f8c81afa6f1b1 Template:Code 10 476 967 966 2024-03-16T10:46:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|id={{{id|}}}|style={{{style|}}}|inline=1}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 5d9b1a0980efe1b02eb91bc717438a5ae4a5ee04 Template:Em 10 477 969 968 2024-03-16T10:46:39Z Motzoid India 2 1 revision imported wikitext text/x-wiki <em {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</em><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> e2fac6fb507a0dd72c4e79d02403049c7d857c8d Template:Strong 10 478 971 970 2024-03-16T10:46:39Z Motzoid India 2 1 revision imported wikitext text/x-wiki <strong {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</strong><noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> a6c6d3b520e2018e19376e2f0e1a72801336d1df Template:Tooltip 10 479 973 972 2024-03-16T10:46:39Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Template:Tooltip/styles.css" />{{#ifeq:{{yesno-no|{{{link}}}}}|yes |[[{{{1}}}|<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>]] |<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span> }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using tooltip with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Tooltip]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | class | dotted | id | link | style }}<noinclude> {{Documentation|Template:Abbr/doc}} </noinclude> 0bc4ac1b7ea7d4f2cdbb94b76559770a78cd10d9 Template:Tooltip/styles.css 10 480 975 974 2024-03-16T10:46:40Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ .tooltip-dotted { border-bottom: 1px dotted; cursor: help; } 567ab0781901eeeb93077ef25052613364378d1e Template:Yesno-no 10 481 977 976 2024-03-16T10:46:40Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:For 10 482 979 978 2024-03-16T10:46:40Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 3f70c0fa7cd736071e7c6e7dcd90ff3704df26bb Template:Pluralize from text 10 483 981 980 2024-03-16T10:46:41Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Detect singular|pluralize}}<noinclude>{{documentation}}</noinclude> 305f4b531ea5639895c83cecd0fd809f7f5cf845 Template:Replace 10 484 983 982 2024-03-16T10:46:41Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|plain={{{plain|true}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude> 4192ba916713e0f44fdfd0f8e0d9d105c0c85472 Template:URL 10 485 985 984 2024-03-16T10:46:41Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:URL|url}}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using URL template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:URL]] with unknown parameter "_VALUE_"|ignoreblank=y | 1 | 2 }}<noinclude>{{documentation}}</noinclude> 5671474ce4656f07c5bdc47292d1dcbe9c70317e Module:Check for clobbered parameters 828 486 987 986 2024-03-16T10:46:41Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p 2d18fb6802fa261d88a0e135ab147ab9f062acde Module:Color contrast 828 487 989 988 2024-03-16T10:46:42Z Motzoid India 2 1 revision imported Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 488 991 990 2024-03-16T10:46:42Z Motzoid India 2 1 revision imported Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:Detect singular 828 489 993 992 2024-03-16T10:46:42Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} local getArgs = require('Module:Arguments').getArgs local yesNo = require('Module:Yesno') local getPlain = require('Module:Text').Text().getPlain -- function to determine whether "sub" occurs in "s" local function plainFind(s, sub) return mw.ustring.find(s, sub, 1, true) end -- function to count the number of times "pattern" (a regex) occurs in "s" local function countMatches(s, pattern) local _, count = mw.ustring.gsub(s, pattern, '') return count end local singular = 1 local likelyPlural = 2 local plural = 3 -- Determine whether a string is singular or plural (i.e., it represents one -- item or many) -- Arguments: -- origArgs[1]: string to process -- origArgs.no_comma: if false, use commas to detect plural (default false) -- origArgs.parse_links: if false, treat wikilinks as opaque singular objects (default false) -- Returns: -- singular, likelyPlural, or plural (see constants above), or nil for completely unknown function p._main(origArgs) origArgs = type(origArgs) == 'table' and origArgs or {} local args = {} -- canonicalize boolean arguments for key, default in pairs({no_comma=false,parse_links=false,any_comma=false,no_and=false}) do if origArgs[key] == nil then args[key] = default else args[key] = yesNo(origArgs[key],default) end end local checkComma = not args.no_comma local checkAnd = not args.no_and local rewriteLinks = not args.parse_links local anyComma = args.any_comma local s = origArgs[1] -- the input string if not s then return nil -- empty input returns nil end s = tostring(s) s = mw.text.decode(s,true) --- replace HTML entities (to avoid spurious semicolons) if plainFind(s,'data-plural="0"') then -- magic data string to return true return singular end if plainFind(s,'data-plural="1"') then -- magic data string to return false return plural end -- count number of list items local numListItems = countMatches(s,'<%s*li') -- if exactly one, then singular, if more than one, then plural if numListItems == 1 then return singular end if numListItems > 1 then return plural end -- if "list of" occurs inside of wlink, then it's plural if mw.ustring.find(s:lower(), '%[%[[^%]]*list of[^%]]+%]%]') then return plural end -- fix for trailing br tags passed through [[template:marriage]] s = mw.ustring.gsub(s, '<%s*br[^>]*>%s*(</div>)', '%1') -- replace all wikilinks with fixed string if rewriteLinks then s = mw.ustring.gsub(s,'%b[]','WIKILINK') end -- Five conditions: any one of them can make the string a likely plural or plural local hasBreak = mw.ustring.find(s,'<%s*br') -- For the last 4, evaluate on string stripped of wikimarkup s = getPlain(s) local hasBullets = countMatches(s,'%*+') > 1 local multipleQids = mw.ustring.find(s,'Q%d+[%p%s]+Q%d+') -- has multiple QIDs in a row if hasBullets or multipleQids then return plural end local commaPattern = anyComma and '[,;]' or '%D[,;]%D' -- semi-colon similar to comma local hasComma = checkComma and mw.ustring.find(s, commaPattern) local hasAnd = checkAnd and mw.ustring.find(s,'[,%s]and%s') if hasBreak or hasComma or hasAnd then return likelyPlural end return singular end function p._pluralize(args) args = type(args) == 'table' and args or {} local singularForm = args[3] or args.singular or "" local pluralForm = args[4] or args.plural or "" local likelyForm = args.likely or pluralForm local link = args[5] or args.link if link then link = tostring(link) singularForm = '[['..link..'|'..singularForm..']]' pluralForm = '[['..link..'|'..pluralForm..']]' likelyForm = '[['..link..'|'..likelyForm..']]' end if args[2] then return pluralForm end local detect = p._main(args) if detect == nil then return "" -- return blank on complete failure end if detect == singular then return singularForm elseif detect == likelyPlural then return likelyForm else return pluralForm end end function p.main(frame) local args = getArgs(frame) -- For template, return 1 if singular, blank if plural or empty local result = p._main(args) if result == nil then return 1 end return result == singular and 1 or "" end function p.pluralize(frame) local args = getArgs(frame) return p._pluralize(args) end return p 6afb2e8c0bd8ddff094e2861b836521ee4a5a779 Module:For 828 490 995 994 2024-03-16T10:46:43Z Motzoid India 2 1 revision imported Scribunto text/plain local mArguments --initialize lazily local mHatlist = require('Module:Hatnote list') local mHatnote = require('Module:Hatnote') local yesNo = require('Module:Yesno') local p = {} --Implements {{For}} from the frame --uses capitalized "For" to avoid collision with Lua reserved word "for" function p.For (frame) mArguments = require('Module:Arguments') return p._For(mArguments.getArgs(frame)) end --Implements {{For}} but takes a manual arguments table function p._For (args) local use = args[1] if (not use) then return mHatnote.makeWikitextError( 'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.', 'Template:For#Errors', args.category ) end local pages = {} function two (a, b) return a, b, 1 end --lets us run ipairs from 2 for k, v in two(ipairs(args)) do table.insert(pages, v) end local title = mw.title.getCurrentTitle() local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace local oddCat = skipCat and '' or '[[Category:Hatnote templates using unusual parameters]]' local category = yesNo(args.category) return mHatnote._hatnote( mHatlist.forSeeTableToString({{use = use, pages = pages}}), {selfref = args.selfref} ) .. ( (use == 'other uses') and ((category == true) or (category == nil)) and oddCat or '' ) end return p 2faf1bd8c657f3425af829cbde9733a936d8d4f4 Module:Text 828 491 997 996 2024-03-16T10:46:43Z Motzoid India 2 1 revision imported Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2022-07-21", suite = "Text" } --[=[ Text utilities ]=] -- local globals local PatternCJK = false local PatternCombined = false local PatternLatin = false local PatternTerminated = false local QuoteLang = false local QuoteType = false local RangesLatin = false local SeekQuote = false local function initLatinData() if not RangesLatin then RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } end if not PatternLatin then local range PatternLatin = "^[" for i = 1, #RangesLatin do range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] ) end -- for i PatternLatin = PatternLatin .. "]*$" end end local function initQuoteData() -- Create quote definitions if not QuoteLang then QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } end if not QuoteType then QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } end end -- initQuoteData() local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite initQuoteData() local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" if not patternCJK then patternCJK = mw.ustring.char( 91, 4352, 45, 4607, 11904, 45, 42191, 43072, 45, 43135, 44032, 45, 55215, 63744, 45, 64255, 65072, 45, 65103, 65381, 45, 65500, 131072, 45, 196607, 93 ) end return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string initLatinData() return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end if not SeekQuote then SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK end return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed if not PatternCombined then PatternCombined = mw.ustring.char( 91, 0x0300, 45, 0x036F, 0x1AB0, 45, 0x1AFF, 0x1DC0, 45, 0x1DFF, 0xFE20, 45, 0xFE2F, 93 ) end decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r if not PatternTerminated then PatternTerminated = mw.ustring.char( 91, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" end if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r initLatinData() if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range for i = 1, #RangesLatin do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then initQuoteData() r = { } r.QuoteLang = QuoteLang r.QuoteType = QuoteType end return r end -- Text.test() -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 07f1fc4d39342fd92bdae1c5463bbfede7eeda1a Module:URL 828 492 999 998 2024-03-16T10:46:43Z Motzoid India 2 1 revision imported Scribunto text/plain -- -- This module implements {{URL}} -- -- See unit tests at [[Module:URL/testcases]] local p = {} local function safeUri(s) local success, uri = pcall(function() return mw.uri.new(s) end) if success then return uri end end local function extractUrl(args) for name, val in pairs(args) do if name ~= 2 and name ~= "msg" then local url = name .. "=" .. val; url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url); if uri and uri.host then return url end end end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } } end else return text end end -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error url = mw.ustring.gsub(url, '#$', '') url = mw.ustring.gsub(url, '%?$', '') -- If it's an HTTP[S] URL without the double slash, fix it. url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url) -- Handle URL's without a protocol and URL's that are protocol-relative, -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then url = 'http://' .. url uri = safeUri(url) end if text == '' then if uri then if uri.path == '/' then uri.path = '' end local port = '' if uri.port then port = ':' .. uri.port end text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '') -- Add <wbr> before _/.-# sequences text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know. text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1") -- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1") text = mw.ustring.gsub(text,"(_+)","<wbr/>%1") else -- URL is badly-formed, so just display whatever was passed in text = url end end return mw.ustring.format('<span class="url">[%s %s]</span>', url, text) end --[[ The main entry point for calling from Template:URL. --]] function p.url(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' local msg = templateArgs.msg or parentArgs.msg or '' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' return p._url(url, text, msg) end --[[ The entry point for calling from the forked Template:URL2. This function returns no message by default. It strips out wiki-link markup, html tags, and everything after a space. --]] function p.url2(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' -- default to no message local msg = templateArgs.msg or parentArgs.msg or 'no' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' -- if the url came from a Wikidata call, it might have a pen icon appended -- we want to keep that and add it back at the end. local u1, penicon = mw.ustring.match( url, "(.*)(&nbsp;<span class='penicon.*)" ) if penicon then url = u1 end -- strip out html tags and [ ] from url url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "") -- truncate anything after a space url = url:gsub("%%20", " "):gsub(" .*", "") return (p._url(url, text, msg) or "") .. (penicon or "") end return p 8d7a4c6fe04a01815e940475cf64b28e1ef48cfb Template:In string 10 493 1001 1000 2024-03-16T10:46:44Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:String|replace |source={{#invoke:String|find|source={{{source|{{{1|}}}}}}|target={{{target|{{{2|}}}}}}|start={{{start|{{{3|}}}}}}|plain={{{plain|{{{4|}}}}}}}} |pattern=^0$ |replace={{#if:{{{nomatch|}}}|{{{nomatch|}}}|{{#if:{{{nomatch}}}|0<!-- no replacement -->|<!--return blank-->}}}} |plain=false}}<!-- --><noinclude>{{documentation}}</noinclude> b980c10def03090ad85d76557485fb1be3a19aef Template:Infobox person/height 10 494 1003 1002 2024-03-16T10:46:44Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:person height|main}}<noinclude> {{Documentation}} </noinclude> 7e4749e2788885b5a8760fedb7cc278e9a60a85a Template:Marriage 10 495 1005 1004 2024-03-16T10:46:44Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Template:Marriage/styles.css"/> {{#if:{{{1|}}}||{{#if:{{{2|}}}{{{3|}}}{{{end|{{{reason|}}}}}} |{{#ifeq:{{{1|+}}}|{{{1|-}}}|<div class="marriage-line-margin3px">&#8203;</div>|{{main other|[[Category:Marriage template errors|Z{{PAGENAME}}]]}}}}}}}} <div class="marriage-display-ws">{{#if:{{{1|}}} |{{trim|{{#if:{{{end|{{{reason|}}}}}} |<div style="display:inline-block;line-height:normal;{{#if:{{{2|}}}{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2=20|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|<div class="marriage-line-margin2px">&#8203;</div>}} |{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2=20 |3=<div class="marriage-line-margin2px">&#8203;</div>}} }}}} |<div style="display:inline-block;line-height:normal;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-top:1px;white-space:normal;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-top:1px;white-space:normal;}}}}">{{{1|}}}</div> {{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}} |<div class="marriage-line-margin2px">&#8203;</div> |{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}} |3=<div class="marriage-line-margin2px">&#8203;</div>}}}} }}}}}}&#32;<div style="display:inline-block;{{#if:{{in string|source={{{1}}}|target=<br|plain=true|nomatch=}}|margin-bottom:1px;|{{str ≥ len|1={{delink|{{{1}}}}}|2={{if both|{{{2|}}}|{{{3|}}}|15|20}}|3=margin-bottom:1px;|4={{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|margin-bottom:1px;}}}}}}}}">&#8203;</div>&#40;<!-- -->{{#if:{{{2|}}} |{{#ifeq:{{{end|{{{reason|+}}}}}}| |{{#switch:{{{3|}}} | = after&nbsp;}} |{{abbr|m.|married}}&nbsp;}}{{#ifeq:{{{2|}}}|{{YEAR|{{{2|}}}}} |{{{2|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{2|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}}|{{YEAR|{{{2|}}}}}}}|2={{{2|}}}}} }} |{{#if:{{{3|}}}{{{end|{{{reason|}}}}}}||{{#if:{{#property:P570}}||{{main other|[[Category:Marriage template errors|N{{PAGENAME}}]]}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}||{{#if:{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} | {{main other|[[Category:Marriage template errors|B{{PAGENAME}}]]}}before&nbsp;{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} |{{error-small|date missing}}}}}}<!-- -->{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}{{{3|}}}|&#44;&#32;}}}}}} }}{{#if:{{{3|}}} |{{#ifeq:{{{end|{{{reason|}}}}}}| |{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|{{#ifeq:{{{end|+}}}|{{{end|-}}} |{{#ifeq:{{{end|+}}}|{{{end|-}}} | until | before }} |{{#ifeq:{{{reason|+}}}|{{{reason|-}}} | until | before }}}}&nbsp;}} |{{#if:{{{2|}}} |&#59;&#32; }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" --> | div | div. | divorce | divorced = {{abbr|div.|divorced}}&nbsp; | sep | sep. | separated = {{abbr|sep.|separated}}&nbsp; <!-- commonly used reason for end --> | ann | ann. | annulled | annulment = {{abbr|ann.|annulled}}&nbsp; <!-- commonly used reason for end --> | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died&nbsp;|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead.}}&nbsp;}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason}}&nbsp; | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}}&nbsp; }} }}{{#ifeq:{{{3|}}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }} |{{{3|}}} |{{tooltip|dotted=no|1={{#iferror: {{YEAR|{{{3|}}}}} | {{main other|[[Category:Marriage template errors|I{{PAGENAME}}]]}}{{error-small|invalid year}} |{{Str ≠ len|{{{3}}}|4 |{{#ifexpr:{{#iferror:{{#time:Ymd|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}} }}|{{#time:Ymd}} }} >= {{#time:Ymd|{{{3|}}}}} |{{#ifexpr:{{#time:Ymd|{{if empty|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=ymd}}|{{tomorrow}} }}}} = {{#time:Ymd|{{{3|}}}}} |{{#if:{{{end|{{{reason|}}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|D{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{First word|{{PAGENAMEBASE}}|sep=,}}'s date of death}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{YEAR|{{{3|}}}}} }} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Ymd}} >= {{#time:Ymd|{{{3|}}}}}|posthumous|future}} date}}</var>|{{YEAR|{{{3|}}}}} }}}} |{{#ifexpr:{{#iferror:{{YEAR|{{Wdib |P570|fwd=ALL|maxvals=1|noicon=true|pd=yes|df=y}} }}|{{#time:Y}} }} >= {{YEAR|{{{3|}}}}} |{{YEAR|{{{3|}}}}} |{{main other|[[Category:Marriage template errors|P{{PAGENAME}}]]}}{{if preview|<var>{{colored link|red|Category:Marriage template errors|{{#ifexpr:{{#time:Y}} >= {{{3|}}}|posthumous|future}} year}}</var>|{{YEAR|{{{3|}}}}} }}}} }}}}|2={{{3|}}}}} }} |{{#if:{{{2|}}} |{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}} }}{{#switch:{{lc:{{{end|{{{reason|}}}}}}}} | d | d. | died = died | div | div. | divorce | divorced = divorced | sep | sep. | separated = separated | ann | ann. | annulled | annulment = annulled | she d. | her d. | she died | her death = {{#ifeq:{{#property:P21}}|male|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | he d. | his d. | he died | his death = {{#ifeq:{{#property:P21}}|female|died|{{main other|[[Category:Marriage template errors|X{{PAGENAME}}]]}}{{error-small|"{{lc:{{{end|{{{reason|}}}}}}}}" is deprecated; use "died" instead}}}} | w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{error-small|invalid reason&nbsp}} | = <!--(reason marriage ended not supplied)--> | #default = {{{end|{{{reason|}}}}}} }} }}&#41;<wbr />&#8203;</div><!-- -->{{#invoke:Parameter validation|validateparams|module_options = Module:Parameter validation/default config}}<noinclude> {{documentation}} </noinclude> 75d18d741552275c7a425891372cff59f5eccca5 Template:Str ≥ len 10 496 1007 1006 2024-03-16T10:46:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} >= {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 30546d5d5d81a3efb26afb9d6cc182bdeb70eadc Module:Person height 828 497 1009 1008 2024-03-16T10:46:45Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements [[Template:Infobox person/height]] local p = {} local function splitsuffix(s) local suffix = '' if mw.ustring.match(s,'^(.-)(<sup.*)$') then local a = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(<sup.*)$', '%2') s = a suffix = b .. suffix end if mw.ustring.match(s,'^(.-)(%[%[[Cc]ategory:.*)$') then local a = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%1') local b = mw.ustring.gsub(s, '^(.-)(%[%[[Cc]ategory:.*)$', '%2') s = a suffix = b .. suffix end return s, suffix end local function clean(s) s = mw.ustring.gsub(s, '[Mm]etre', 'm') s = mw.ustring.gsub(s, '([^a])meter', '%1m') -- prevents "parameter" from being changed to "param" s = mw.ustring.gsub(s, '[Cc]enti', 'c') -- changes "centim" to "cm" s = mw.ustring.gsub(s, 'ms', 'm') s = mw.ustring.gsub(s, 'm[%.,]', 'm') s = mw.ustring.gsub(s, '[Ff]eet', 'ft') s = mw.ustring.gsub(s, 'foot', 'ft') s = mw.ustring.gsub(s, 'ft[%.,]', 'ft') s = mw.ustring.gsub(s, '[Ii]nches', 'in') s = mw.ustring.gsub(s, '[Ii]nch', 'in') s = mw.ustring.gsub(s, 'ins', 'in') s = mw.ustring.gsub(s, 'in[%.,]', 'in') s = mw.ustring.gsub(s, '%[%[[Mm]%]%]s', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Mm]|[Mm]%]%]', '[[Metre|m]]') s = mw.ustring.gsub(s, '%[%[[Cc]m%]%]s', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]m|[Cc]m%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Cc]entim|cm%]%]', '[[Centimetre|cm]]') s = mw.ustring.gsub(s, '%[%[[Ii]n|in%]%]', '[[inch|in]]') s = mw.ustring.gsub(s, '(%d)%s+[Cc][Mm]', '%1&nbsp;cm') s = mw.ustring.gsub(s, '(%d)%s+[Mm]', '%1&nbsp;m') s = mw.ustring.gsub(s, '(%d)%s+[Ff][Tt]', '%1&nbsp;ft') s = mw.ustring.gsub(s, '(%d)%s+[Ii][Nn]', '%1&nbsp;in') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Cc][Mm]', '%1cm') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Mm]', '%1m') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ff][Tt]', '%1ft') s = mw.ustring.gsub(s, '(%d&[Nn][Bb][Ss][Pp];)[Ii][Nn]', '%1in') s = mw.ustring.gsub(s, '(%d)%s*[′\']%s*([%d]%d*)%s*[\"″]', '%1 ft %2 in') return s end local function isnumber(s) if s then s = mw.ustring.gsub(s, '%+%s*%d+%s*/%s*%d+%s*$', '') s = mw.ustring.gsub(s, '%s*1%s*/%s*2%s*$', '0.5') return tonumber(s) end return nil end local function trimspace(s) if s then s = mw.ustring.gsub(s, '^%s*(.-)%s*$', '%1') end return s end local function force_unit(s, t) s = mw.ustring.gsub(s, '&[Nn][Bb][Ss][Pp];', '★') if (t == 'cm') then s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)m', '%1%2.%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)(%d+[★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2.%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)m', '%1%2%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%2%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)m', '%1%20%3cm') s = mw.ustring.gsub(s, '(%d*)%.(%d)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%1%20%3[[centimetre|cm]]') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)m', '%100.%2cm') s = mw.ustring.gsub(s, '(%d*)%.([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100.%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)m', '%100%2cm') s = mw.ustring.gsub(s, '^(%s*%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '([%(★%s]%d+)([★%s]+)%[%[[Mm]et[re][re]|m%]%]', '%100%2[[centimetre|cm]]') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+cm)', '%1') s = mw.ustring.gsub(s, '0(%d+%.?%d*[★%s]+%[%[[Cc]entimet[re][re]|cm%]%])', '%1') else s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)cm', '%1.%2%3m') s = mw.ustring.gsub(s, '(%d)(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '%1.%2%3[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)%.(%d*[★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)cm', '0.%1%2m') s = mw.ustring.gsub(s, '(%d%d)([★%s]+)%[%[[Cc]entimet[re][re]|cm%]%]', '0.%1%2[[metre|m]]') end s = mw.ustring.gsub(s, '★', '&nbsp;') return s end local function get_convert_args(s, prefer, enforce, ri) local prefer_m = (prefer or '') == 'm' local force_m = (enforce or '') == 'm' local prefer_cm = (prefer or '') == 'cm' local force_cm = (enforce or '') == 'cm' ri = (ri or '') == 'cmin' and 'cmin' or '' unconverted = clean(s or '') -- basic unit cleaning s = mw.ustring.gsub(unconverted, '&[Nn][Bb][Ss][Pp];', ' ') local m = mw.ustring.find(s, 'm') local c = mw.ustring.find(s, 'cm') local f = mw.ustring.find(s, 'ft') local i = mw.ustring.find(s, 'in') if m == nil and f == nil and i == nil then return '', unconverted end local adj = nil if c ~= nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, c - 1) if isnumber(n) then if force_m then local prec = require("Module:Math")._precision(trimspace(n)) adj = (prec == 1) and 'ri3' or 'ri2' end if ri ~= '' then adj = force_m and 'ri2' or 'ri0' end return force_m and {n/100,'m','ftin',0,['abbr']='on', ['adj']=adj} or {n,'cm','ftin',0,['abbr']='on', ['adj']=adj}, mw.ustring.sub(s, c+2) end return '', unconverted end if m ~= nil and c == nil and f == nil and i == nil then local n = mw.ustring.sub(s, 1, m - 1) if ri ~= '' then adj = force_cm and 'ri0' or 'ri2' end if isnumber(n) then return force_cm and {n*100,'cm','ftin',0,['abbr']='on',['adj']=adj} or {n,'m','ftin',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, m+1) end return '', unconverted end if f ~= nil and i ~=nil and m == nil then local n1 = mw.ustring.sub(s, 1, f - 1) local n2 = mw.ustring.sub(s, f+2, i - 1) if isnumber(n1) and isnumber(n2) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n1,'ft',n2,'in', 'm',2,['abbr']='on',['adj']=adj} or {n1,'ft',n2,'in', 'cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, i+2) end return '', unconverted end if f ~= nil and i == nil and m == nil then local n = mw.ustring.sub(s, 1, f - 1) if isnumber(n) then if ri ~= '' then local n2 = 12*(n - math.floor(n)) adj = 'ri0' return (force_m or prefer_m) and {math.floor(n),'ft',n2, 'in','m',2,['abbr']='on',['adj']=adj} or {math.floor(n),'ft',n2,'in','cm',0,['abbr']='on',['adj']=adj}, mw.ustring.sub(s, f+2) end return (force_m or prefer_m) and {n,'ft','m',2,['abbr']='on'} or {n,'ft','cm',0,['abbr']='on'}, mw.ustring.sub(s, f+2) end return '', unconverted end if i ~= nil and f == nil and m == nil then local n = mw.ustring.sub(s, 1, i - 1) if isnumber(n) then if ri ~= '' then adj = 'ri0' end return (force_m or prefer_m) and {n,'in','m',2,['abbr']='on'} or {n,'in','cm',0,['abbr']='on'}, mw.ustring.sub(s, i+2) end return '', unconverted end if force_cm and c == nil then return '', force_unit(unconverted, 'cm') end if force_m and c ~= nil then return '', force_unit(unconverted, 'm') end return '', unconverted end function convert(frame, args) local str, suffix = splitsuffix(args[1] or '') local targs, str = get_convert_args(str, args['prefer'] or '', args['enforce'] or '', args['ri'] or '') str = str .. suffix if type(targs) == 'table' then return frame:expandTemplate{ title = 'convert', args = targs} .. str else return str end end function p.main(frame) return convert(frame, frame.args[1] and frame.args or frame:getParent().args) end return p eae45d697c1881086eab11f622b4400e5c177c63 Template:Wikidata image 10 498 1011 1010 2024-03-16T10:46:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#if:{{NAMESPACE}}|| {{#if:{{{1|}}} | {{#if:{{#property:P18}} | {{#ifeq:{{filepath:{{{1|}}} }}|{{filepath:{{#property:P18}} }} | | }} | {{#if:{{#property:P41}}{{#property:P94}}{{#property:P117}}{{#property:P154}}{{#property:P242}} | | }} }} | {{#if:{{#property:P18}} | {{#if:{{{2|}}} | | [[Category:No local image but image on Wikidata]] }} | }} }} }}<noinclude> {{doc}} </noinclude> 572e9efe168616980e2b149a2536e292dfbee5d0 Template:Ubl 10 499 1013 1012 2024-03-16T10:46:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Template:Str ≠ len 10 500 1015 1014 2024-03-16T10:46:46Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}} != {{{2|0}}} <noinclude><!-- str >= len --></noinclude> | {{{3|}}} | {{{4|}}} }}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 62d778f3efdfb20ede86ceede35feb64ed51fe02 Template:Birth date and age 10 501 1017 1016 2024-03-16T10:46:46Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{{{{♥|safesubst:}}}#invoke:age|birth_date_and_age}}{{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Birth date and age]] with unknown parameter "_VALUE_"|unknown={{main other|[[Category:Pages using birth date and age template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|1|2|3|day|month|year|df|mf}}{{#ifeq: {{NAMESPACENUMBER}} | 0 | {{#if: {{#invoke:wd|label|raw}} | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}} | {{#if: {{#invoke:wd|properties|raw|P569}} | | [[Category:Date of birth not in Wikidata]] }} }} | [[Category:Articles without Wikidata item]] }} }}</includeonly><noinclude>{{documentation}}</noinclude> 55c7a1b79d4b09cf1b1c81565ac2bd7da422612e Template:Para 10 502 1019 1018 2024-03-16T10:46:46Z Motzoid India 2 1 revision imported wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Template:Crossref 10 503 1021 1020 2024-03-16T10:46:47Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Crossreference]] {{Rcat shell| {{R from template shortcut}} }} dc4192593ccb8eaa34c0440c4aa712442a06c329 Template:Crossreference 10 504 1023 1022 2024-03-16T10:46:47Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Crossreference/styles.css" />{{Hatnote inline |1={{{1|{{{text|{{{content|<noinclude>sample content</noinclude>}}}}}}}}} |extraclasses=crossreference {{{class|{{{extraclasses|}}}}}} |selfref={{#if:{{{selfref|{{{printworthy|{{{unprintworthy|{{{pw|}}}}}}}}}}}}||yes}} |inline={{{inline|true}}} }}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 974832216c2d5115ece5c3c5535216d80a26d876 Template:Crossreference/styles.css 10 505 1025 1024 2024-03-16T10:46:47Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ /* This snippet just undoes the default "padding-left: 1.6em;" imposed by div.hatnote, when Template:Crossreference is used in block (div) mode. Ignore the dumb CSS editor's "Element (div.crossreference) is overqualified" warning. It is wrong. We do not want to apply any CSS intended for block mode when it is not in block mode. While it's unlikely our "padding-left: 0;" does anything wrong in inline (span) mode, we can't guarantee it forever. */ div.crossreference { padding-left: 0; } ae665603577c5dbafbdf190ec9e29f2ed1f7cd77 Template:Hatnote inline 10 506 1027 1026 2024-03-16T10:46:48Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Hatnote inline|hatnoteInline |1={{{1|{{{text|{{{content}}}}}}}}} |extraclasses={{{class|{{{extraclasses|}}}}}} |selfref={{#if:{{{printworthy|{{{selfref|}}}}}}||yes}} |category={{{category|}}} |inline={{{inline|true}}} }}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 338fff0fbaebe79b8f95df075f8c9d20aeed1d63 Module:Hatnote inline 828 507 1029 1028 2024-03-16T10:46:48Z Motzoid India 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote-inline -- -- -- -- This module produces hatnote-style links, and links to related articles, -- -- but inside a <span>, instead of the <div> used by Module:Hatnote. It -- -- implements the {{hatnote-inline}} meta-template. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mArguments = require('Module:Arguments') local yesno = require('Module:Yesno') local p = {} function p.hatnoteInline (frame) local args = mArguments.getArgs(frame) local hatnote = mHatnote.hatnote(frame:newChild{title="Module:Hatnote inline", args = args}) if args.inline == nil or yesno(args.inline, true) then local subs = { ['<div'] = '<span', ['</div>$'] = '</span>' } for k, v in pairs(subs) do hatnote = string.gsub(hatnote, k, v, 1) end end return hatnote end p.hatnote = p.hatnoteInline --alias return p d7e9b9bfe56b41f5fe6b46d4971140145abe41bf Template:YEAR 10 508 1031 1030 2024-03-16T10:46:48Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#if: {{{1|}}} |{{#iferror:{{#time:Y|1 January {{{1|}}} }} |{{#iferror:{{#time:Y|{{{1|}}} }} |{{#ifeq:{{{2|}}}|{{{2}}}|error|{{error|Error}}}} |{{#time:Y|{{{1|}}} }} }} |{{#time:Y|1 January {{{1|}}} }} }} |{{CURRENTYEAR}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 397274250b850cd58a73ae0feb580b3f511afb46 Template:Visible anchor 10 509 1033 1032 2024-03-16T10:46:48Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Template:Visible anchor/styles.css" /><span class="vanchor"><!-- -->{{#if:{{{1|}}}|<span id="{{{1}}}"></span>}}<!-- -->{{#if:{{{2|}}}|<span id="{{{2}}}"></span>}}<!-- -->{{#if:{{{3|}}}|<span id="{{{3}}}"></span>}}<!-- -->{{#if:{{{4|}}}|<span id="{{{4}}}"></span>}}<!-- -->{{#if:{{{5|}}}|<span id="{{{5}}}"></span>}}<!-- -->{{#if:{{{6|}}}|<span id="{{{6}}}"></span>}}<!-- -->{{#if:{{{7|}}}|<span id="{{{7}}}"></span>}}<!-- -->{{#if:{{{8|}}}|<span id="{{{8}}}"></span>}}<!-- -->{{#if:{{{9|}}}|<span id="{{{9}}}"></span>}}<!-- -->{{#if:{{{10|}}}|<span id="{{{10}}}"></span>}}<!-- --><span class="vanchor-text">{{{text|{{{1}}}}}}</span><!-- -->{{#if:{{{11|}}}|<span class="error">[[Template:Visible anchor]]: too many anchors, maximum is 10.</span>}}<!-- --></span><noinclude> {{Documentation}} <!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE; INTERWIKIS GO TO WIKIDATA, THANK YOU! --> </noinclude> 291421f0e3c11a13eea17d283cc3d18aa587bbf7 Template:Visible anchor/styles.css 10 510 1035 1034 2024-03-16T10:46:49Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ .vanchor > :target ~ .vanchor-text { background-color: #b1d2ff; } 0bc96886f41e0799b8dbfa48836892c2bb7de792 Template:Vanchor 10 511 1037 1036 2024-03-16T10:46:49Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Visible anchor]] {{Redirect category shell| {{R from template shortcut}} }} 8adbd53dde59b46bf409a2fbda6056f8c0199e9c Template:No redirect 10 512 1039 1038 2024-03-16T10:46:49Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Template:Notice 10 513 1041 1040 2024-03-16T10:46:50Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Template:Indented plainlist 10 514 1043 1042 2024-03-16T10:46:50Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{plainlist|class={{{class|}}}|style=margin-left:{{{in|{{{indent|1em}}}}}};text-indent:-{{{in|{{{indent|1em}}}}}};{{{style|}}}}}{{#if:{{{1|}}}| {{{1}}} {{endplainlist}}}}<noinclude></div> {{documentation}} </noinclude> 53356b0408eca171599999a642cb8ababe0874c7 Module:ParameterCount 828 515 1045 1044 2024-03-16T10:46:50Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module produces a count of all the arguments passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a string is blank local function isBlank(s) return not s:find('%S') end -- Tests whether a string is a valid positional key, and if so, returns it. If -- the key is invalid, this returns nil. local function isPositionalKey(s) s = trim(s) if s:find('^[1-9][0-9]*$') then return tonumber(s) end end -- Return the count of all arguments for which testFunc returns a truthy value. local function count(args, testFunc) local ret = 0 for key, val in pairs(args) do if testFunc(key, val) then ret = ret + 1 end end return ret end -- Check shared arguments and get the parent argument count. local function main(frame, testFunc) local blankifiedTestFunc if yesno(frame.args.checkblanks) ~= false then -- Extend the test function to check for blanks as well. blankifiedTestFunc = function (key, val) if not isBlank(val) then return testFunc(key, val) end end else blankifiedTestFunc = testFunc end return count(frame:getParent().args, blankifiedTestFunc) end return { -- Called with {{#invoke:ParameterCount|all}} -- All specified parameters are counted, even those not supported by the -- template. all = function (frame) return main(frame, function () return true end) end, -- Called with {{#invoke:ParameterCount|main}} -- Users can specify a list of parameters to check, and a list of Lua -- Ustring patterns to check each parameter against. main = function (frame) local args = frame.args local keys, patterns = {}, {} -- Get key list for i, key in ipairs(args) do local positionalKey = isPositionalKey(key) if positionalKey then keys[positionalKey] = true else keys[trim(key)] = true end end -- Get patterns do local function getPattern(i) local pattern = args['pattern' .. tostring(i)] if pattern and pattern ~= '' then return pattern end end local i = 1 local pattern = getPattern(i) while pattern do patterns[i] = pattern i = i + 1 pattern = getPattern(i) end end -- Construct the test function local testFunc = function (key, val) if keys[key] then return true end for i, pattern in ipairs(patterns) do if mw.ustring.find(tostring(key), pattern) then return true end end return false end return main(frame, testFunc) end } 63e3811b7a17825c071b1920ce88af06bc1e778d Template:Large 10 516 1047 1046 2024-03-16T10:46:51Z Motzoid India 2 1 revision imported wikitext text/x-wiki <span style="font-size:120%">{{{1}}}</span><noinclude> {{Documentation}} </noinclude> 8ba6ec8c3178e22dc1f05aa239df8a2b052be668 Template:Documentation 10 12 1049 16 2024-03-16T10:46:51Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> ce7fd93f18c46b4fa871bf679afd05cbda72d8c4 Module:Documentation 828 8 1051 12 2024-03-16T10:46:51Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- env.printTitle - the print version of the template, located at the /Print subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.printTitle() --[[ -- Title object for the /Print subpage. -- Messages: -- 'print-subpage' --> 'Print' --]] return env.templateTitle:subPageTitle(message('print-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Bharatpedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Bharatpedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 6 then -- File namespace preload = message('file-docpage-preload') elseif subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. if printBlurb then text = text .. '<br />' .. printBlurb end end end local box = mw.html.create('div') -- 'documentation-metadata' box:addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Bharatpedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Bharatpedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end function p.makePrintBlurb(args, env) --[=[ -- Generates the blurb displayed when there is a print version of the template available. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'print-link-display' --> '/Print' -- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' -- .. ' of this template exists at $1.' -- .. ' If you make a change to this template, please update the print version as well.' -- 'display-print-category' --> true -- 'print-category' --> 'Templates with print versions' --]=] local printTitle = env.printTitle if not printTitle then return nil end local ret if printTitle.exists then local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display')) ret = message('print-blurb', {printLink}) local displayPrintCategory = message('display-print-category', nil, 'boolean') if displayPrintCategory then ret = ret .. makeCategoryLink(message('print-category')) end end return ret end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 10dd02b48fdee56bb136439c7deb039771634974 Module:Documentation/config 828 11 1053 15 2024-03-16T10:46:51Z Motzoid India 2 1 revision imported Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Bharatpedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Bharatpedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Bharatpedia:Template documentation|documentation]] is [[Bharatpedia:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Bharatpedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['file-docpage-preload'] -- Preload file for documentation page in the file namespace. cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- Print version configuration ---------------------------------------------------------------------------------------------------- -- cfg['print-subpage'] -- The name of the template subpage used for print versions. cfg['print-subpage'] = 'Print' -- cfg['print-link-display'] -- The text to display when linking to the /Print subpage. cfg['print-link-display'] = '/Print' -- cfg['print-blurb'] -- Text to display if a /Print subpage exists. $1 is a link to the subpage with -- a display value of cfg['print-link-display']. cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.' .. ' If you make a change to this template, please update the print version as well.' -- cfg['display-print-category'] -- Set to true to enable output of cfg['print-category'] if a /Print subpage exists. -- This should be a boolean value (either true or false). cfg['display-print-category'] = true -- cfg['print-category'] -- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists. cfg['print-category'] = 'Templates with print versions' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Bharatpedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Bharatpedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 88104584c928942cb3c3a4b4d4e9b64c382097df Module:Documentation/styles.css 828 517 1055 1054 2024-03-16T10:46:52Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } html.skin-night-mode-clientpref-1 .documentation, html.skin-night-mode-clientpref-1 .documentation-metadata { background-color: inherit; } @media (prefers-color-scheme: dark) { html.skin-night-mode-clientpref-2 .documentation, html.skin-night-mode-clientpref-2 .documentation-metadata { background-color: inherit; } } 92223f6a535f0908f32517eee0e93060e6ba30bd Template:Endplainlist 10 518 1057 1056 2024-03-16T10:46:52Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Var 10 519 1059 1058 2024-03-16T10:46:52Z Motzoid India 2 1 revision imported wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Module:Uses Wikidata 828 520 1061 1060 2024-03-16T10:46:52Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} function p.usesProperty(frame) local args = frame.getParent(frame).args or nil if mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li>[[File:Disc Plain blue dark.svg|middle|4px|link=|alt=]] <b><i>[[d:Property talk:" .. p_num .. "|" .. label .. " (" .. string.upper(p_num) .. ")]]</i></b> (see <span class='plainlinks'>[https://query.wikidata.org/embed.html#SELECT%20%3FWikidata_item_%20%3FWikidata_item_Label%20%3Fvalue%20%3FvalueLabel%20%3FEnglish_Wikipedia_article%20%23Show%20data%20in%20this%20order%0A%7B%0A%09%3FWikidata_item_%20wdt%3A" .. p_num .. "%20%3Fvalue%20.%20%23Collecting%20all%20items%20which%20have%20" .. p_num .. "%20data%2C%20from%20whole%20Wikidata%20item%20pages%0A%09OPTIONAL%20%7B%3FEnglish_Wikipedia_article%20schema%3Aabout%20%3FWikidata_item_%3B%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%7D%20%23If%20collected%20item%20has%20link%20to%20English%20Wikipedia%2C%20show%20that%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%20%7D%20%23Show%20label%20in%20this%20language.%20%22en%22%20is%20English.%20%20%20%0A%7D%0ALIMIT%201000 uses]</span>)</li>" ii = ii + 1 else break end end result = result.."</ul>" return result end function p.tuProperty(frame) local parent = frame.getParent(frame) local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(parent.args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li><span style='font-size:90%;line-height:1;'>●</span>&nbsp;&nbsp;<b>[[d:Property:" .. p_num .. "|" .. label .. "]]</b> <span style='font-size:90%;'>([[d:Property talk:" .. string.upper(p_num) .. "|" .. p_num .. "]])</span></li>" ii = ii + 1 else break end end result = result.."</ul>" return result end return p 8b704fdbc00fb94538c56f18c5c01f1e72963ea9 Template:Tag 10 521 1063 1062 2024-03-16T10:46:53Z Motzoid India 2 1 revision imported wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Template:Cslist 10 522 1065 1064 2024-03-16T10:46:53Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Cslist/styles.css" />{{#invoke:Cslist |makelist}}<noinclude> {{documentation}} </noinclude> 8de0ef2dc8a52f1f2d050ca747d583cd776a0b84 Template:Cslist/styles.css 10 523 1067 1066 2024-03-16T10:46:53Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ /* make an inline list with either comma or semicolon separators */ ul.cslist, ul.sslist { margin: 0; padding: 0; display: inline-block; list-style: none; } ul.cslist-embedded { display: inline; } .cslist li, .sslist li { margin: 0; padding: 0 0.25em 0 0; display: inline-block; } .cslist li:after { content: ", "; } .sslist li:after { content: "; "; } .cslist li:last-child:after, .sslist li:last-child:after { content: none; } b7fc7c7a6f4e14d23d0a7483f5727aec838c7a21 Module:Cslist 828 524 1069 1068 2024-03-16T10:46:54Z Motzoid India 2 1 revision imported Scribunto text/plain p = {} p.makelist = function(frame) local args = frame.args if not args[1] then args = frame:getParent().args if not args[1] then return end end local semi = (args.semi or ""):sub(1,1):lower() semi = (semi == "t") or (semi == "y") local embedded = (args.embedded or ""):sub(1,1):lower() embedded = (embedded == "y") local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local listclass = "" if semi then listclass = listclass .. "sslist" else listclass = listclass .. "cslist" end if embedded then listclass = listclass .. " cslist-embedded" end if out ~= "" then return '<ul class="'.. listclass ..'">' .. out .. '</ul>' end end return p 82fa872fef0f065ea5b7e6639e4390c93142fac9 Template:Sandbox other 10 525 1071 1070 2024-03-16T10:46:54Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Count 10 526 1073 1072 2024-03-16T10:46:54Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{safesubst<noinclude/>:#ifexpr:{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}>0|{{safesubst<noinclude/>:#invoke:ParameterCount|main|pattern1=^[%d]+$}}|{{{base|0}}}}}<noinclude>{{documentation}}</noinclude> ccdb0aa784669ceae716044a9267ac7c4dea7283 Template:Tomorrow 10 527 1075 1074 2024-03-16T10:46:54Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch:{{{1}}} |long={{#time:F"{{{2| }}}"j",{{{2| }}}"Y|+1 day}} |num={{#time:n"{{{2| }}}"j|+1 day}} |#default={{#time:F"{{{2| }}}"j|+1 day}} }}<noinclude>{{Documentation}}</noinclude> 5e44249f064450c1b28daa6959741f668465bb5e Template:Documentation subpage 10 528 1077 1076 2024-03-16T10:46:55Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 Template:Tnull 10 529 1079 1078 2024-03-16T10:46:55Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link null]] {{Redirect category shell| {{R from move}} }} b22d666a4b16808dc3becc2403546fb9ab5dea7e Template:Template link null 10 530 1081 1080 2024-03-16T10:46:55Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tnull}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 2167c503e001d24d870ef82a9de0aaa9832404cb Template:Tlp 10 531 1083 1082 2024-03-16T10:46:56Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link with parameters]] {{R from move}} 3867e4ef4fe637ce8530859b5486b23e916d0b8a Template:Template link with parameters 10 532 1085 1084 2024-03-16T10:46:56Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlp}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 8fe73a6eea633360a927820d10469b7292bfc1c2 Template:Samp 10 533 1087 1086 2024-03-16T10:46:56Z Motzoid India 2 1 revision imported wikitext text/x-wiki <samp {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-left:0.4em; padding-right:0.4em; color:{{{color|#666666}}}; {{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</samp><noinclude> <!--Categories go near the bottom of the /doc page.--> {{Documentation}} </noinclude> f6ab5d4006d47b4412736ea88bf42847cfb57a40 Module:Shortcut 828 534 1089 1088 2024-03-16T10:46:57Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 03fd46a265e549852a9ed3d3a9249b247d84cb4f Module:Shortcut/config 828 535 1091 1090 2024-03-16T10:46:57Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module holds configuration data for [[Module:Shortcut]]. return { -- The heading at the top of the shortcut box. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['shortcut-heading'] = '[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]', -- The heading when |redirect=yes is given. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['redirect-heading'] = '[[Wikipedia:Redirect|{{PLURAL:$1|Redirect|Redirects}}]]', -- The error message to display when a shortcut is invalid (is not a string, or -- is the blank string). It accepts the following parameter: -- $1 - the number of the shortcut in the argument list. (required) ['invalid-shortcut-error'] = 'shortcut #$1 was invalid (shortcuts must be ' .. 'strings of at least one character in length)', -- The error message to display when no shortcuts or other displayable content -- were specified. (required) ['no-content-error'] = 'Error: no shortcuts were specified and the ' .. mw.text.nowiki('|msg=') .. ' parameter was not set.', -- A category to add when the no-content-error message is displayed. (optional) ['no-content-error-category'] = 'Shortcut templates with missing parameters', } f9d1d94844d5953753eb19e30a3ce389eda3d319 Module:Parameter validation 828 536 1093 1092 2024-03-16T10:46:57Z Motzoid India 2 1 revision imported Scribunto text/plain local util = { empty = function( s ) return s == nil or type( s ) == 'string' and mw.text.trim( s ) == '' end , extract_options = function ( frame, optionsPrefix ) optionsPrefix = optionsPrefix or 'options' local options, n, more = {} if frame.args['module_options'] then local module_options = mw.loadData( frame.args['module_options'] ) if type( module_options ) ~= 'table' then return {} end local title = mw.title.getCurrentTitle() local local_ptions = module_options[ title.namespace ] or module_options[ title.nsText ] or {} for k, v in pairs( local_ptions ) do options[k] = v end end repeat ok, more = pcall( mw.text.jsonDecode, frame.args[optionsPrefix .. ( n or '' )] ) if ok and type( more ) == 'table' then for k, v in pairs( more ) do options[k] = v end end n = ( n or 0 ) + 1 until not ok return options end , build_namelist = function ( template_name, sp ) local res = { template_name } if sp then if type( sp ) == 'string' then sp = { sp } end for _, p in ipairs( sp ) do table.insert( res, template_name .. '/' .. p ) end end return res end , table_empty = function( t ) -- normally, test if next(t) is nil, but for some perverse reason, non-empty tables returned by loadData return nil... if type( t ) ~= 'table' then return true end for a, b in pairs( t ) do return false end return true end , } local function _readTemplateData( templateName ) local title = mw.title.makeTitle( 0, templateName ) local templateContent = title and title.exists and title:getContent() -- template's raw content local capture = templateContent and mw.ustring.match( templateContent, '<templatedata%s*>(.*)</templatedata%s*>' ) -- templatedata as text -- capture = capture and mw.ustring.gsub( capture, '"(%d+)"', tonumber ) -- convert "1": {} to 1: {}. frame.args uses numerical indexes for order-based params. local trailingComma = capture and mw.ustring.find( capture, ',%s*[%]%}]' ) -- look for ,] or ,} : jsonDecode allows it, but it's verbotten in json if capture and not trailingComma then return pcall( mw.text.jsonDecode, capture ) end return false end local function readTemplateData( templateName ) if type( templateName ) == 'string' then templateName = { templateName, templateName .. '/' .. docSubPage } end if type( templateName ) == "table" then for _, name in ipairs( templateName ) do local td, result = _readTemplateData( name ) if td then return result end end end return nil end -- this is the function to be called by other modules. it expects the frame, and then an optional list of subpages, e.g. { "Documentation" }. -- if second parameter is nil, only tempalte page will be searched for templatedata. function calculateViolations( frame, subpages ) -- used for parameter type validy test. keyed by TD 'type' string. values are function(val) returning bool. local type_validators = { ['number'] = function( s ) return mw.language.getContentLanguage():parseFormattedNumber( s ) end } function compatible( typ, val ) local func = type_validators[typ] return type( func ) ~= 'function' or util.empty( val ) or func( val ) end local t_frame = frame:getParent() local t_args, template_name = t_frame.args, t_frame:getTitle() template_name = mw.ustring.gsub( template_name, '/sandbox', '', 1 ) local td_source = util.build_namelist( template_name, subpages ) if frame.args['td_source'] then table.insert(td_source, frame.args['td_source']) end local templatedata = readTemplateData( td_source ) local td_params = templatedata and templatedata.params local all_aliases, all_series = {}, {} if not td_params then return { ['no-templatedata'] = { [''] = '' } } end -- from this point on, we know templatedata is valid. local res = {} -- before returning to caller, we'll prune empty tables -- allow for aliases for x, p in pairs( td_params ) do for y, alias in ipairs( p.aliases or {} ) do p['primary'] = x td_params[x] = p all_aliases[alias] = p if tonumber(alias) then all_aliases[tonumber(alias)] = p end end end -- handle undeclared and deprecated local already_seen = {} local series = frame.args['series'] for p_name, value in pairs( t_args ) do local tp_param, noval, numeric, table_name = td_params[p_name] or all_aliases[p_name], util.empty( value ), tonumber( p_name ) local hasval = not noval if not tp_param and series then -- 2nd chance. check to see if series for s_name, p in pairs(td_params) do if mw.ustring.match( p_name, '^' .. s_name .. '%d+' .. '$') then -- mw.log('found p_name '.. p_name .. ' s_name:' .. s_name, ' p is:', p) debugging series support tp_param = p end -- don't bother breaking. td always correct. end end if not tp_param then -- not in TD: this is called undeclared -- calculate the relevant table for this undeclared parameter, based on parameter and value types table_name = noval and numeric and 'empty-undeclared-numeric' or noval and not numeric and 'empty-undeclared' or hasval and numeric and 'undeclared-numeric' or 'undeclared' -- tzvototi nishar. else -- in td: test for deprecation and mistype. if deprecated, no further tests table_name = tp_param.deprecated and hasval and 'deprecated' or tp_param.deprecated and noval and 'empty-deprecated' or not compatible( tp_param.type, value ) and 'incompatible' or not series and already_seen[tp_param] and hasval and 'duplicate' if hasval and table_name ~= 'duplicate' then already_seen[tp_param] = p_name end end -- report it. if table_name then res[table_name] = res[table_name] or {} if table_name == 'duplicate' then local primary_param = tp_param['primary'] local primaryData = res[table_name][primary_param] if not primaryData then primaryData = {} table.insert(primaryData, already_seen[tp_param]) end table.insert(primaryData, p_name) res[table_name][primary_param] = primaryData else res[table_name][p_name] = value end end end -- check for empty/missing parameters declared "required" for p_name, param in pairs( td_params ) do if param.required and util.empty( t_args[p_name] ) then local is_alias for _, alias in ipairs( param.aliases or {} ) do is_alias = is_alias or not util.empty( t_args[alias] ) end if not is_alias then res['empty-required'] = res['empty-required'] or {} res['empty-required'][p_name] = '' end end end mw.logObject(res) return res end -- wraps report in hidden frame function wrapReport(report, template_name, options) mw.logObject(report) if util.empty( report ) then return '' end local naked = mw.title.new( template_name )['text'] naked = mw.ustring.gsub(naked, 'Infobox', 'infobox', 1) report = ( options['wrapper-prefix'] or "<div class = 'paramvalidator-wrapper'><span class='paramvalidator-error'>" ) .. report .. ( options['wrapper-suffix'] or "</span></div>" ) report = mw.ustring.gsub( report, 'tname_naked', naked ) report = mw.ustring.gsub( report, 'templatename', template_name ) return report end -- this is the "user" version, called with {{#invoke:}} returns a string, as defined by the options parameter function validateParams( frame ) local options, report, template_name = util.extract_options( frame ), '', frame:getParent():getTitle() local ignore = function( p_name ) for _, pattern in ipairs( options['ignore'] or {} ) do if mw.ustring.match( p_name, '^' .. pattern .. '$' ) then return true end end return false end local replace_macros = function( error_type, s, param_names ) function concat_and_escape( t , sep ) sep = sep or ', ' local s = table.concat( t, sep ) return ( mw.ustring.gsub( s, '%%', '%%%%' ) ) end if s and ( type( param_names ) == 'table' ) then local k_ar, kv_ar = {}, {} for k, v in pairs( param_names ) do table.insert( k_ar, k ) if type(v) == 'table' then v = table.concat(v, ', ') end if error_type == 'duplicate' then table.insert( kv_ar, v) else table.insert( kv_ar, k .. ': ' .. v) end end s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) ) s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar, ' AND ' ) ) if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) ~= "" then s = mw.ustring.gsub( s, "<div.*<%/div>", "", 1 ) end end return s end local report_params = function( key, param_names ) local res = replace_macros( key, options[key], param_names ) res = frame:preprocess(res or '') report = report .. ( res or '' ) return res end -- no option no work. if util.table_empty( options ) then return '' end -- get the errors. local violations = calculateViolations( frame, options['doc-subpage'] ) -- special request of bora: use skip_empty_numeric if violations['empty-undeclared-numeric'] then for i = 1, tonumber( options['skip-empty-numeric'] ) or 0 do violations['empty-undeclared-numeric'][i] = nil end end -- handle ignore list, and prune empty violations - in that order! local offenders = 0 for name, tab in pairs( violations ) do -- remove ignored parameters from all violations for pname in pairs( tab ) do if ignore( pname ) then tab[pname] = nil end end -- prune empty violations if util.table_empty( tab ) then violations[name] = nil end -- WORK IS DONE. report the errors. -- if report then count it. if violations[name] and report_params( name, tab ) then offenders = offenders + 1 end end if offenders > 1 then report_params( 'multiple' ) end if offenders ~= 0 then report_params( 'any' ) end -- could have tested for empty( report ), but since we count them anyway... return wrapReport(report, template_name, options) end return { ['validateparams'] = validateParams, ['calculateViolations'] = calculateViolations, ['wrapReport'] = wrapReport } 289097a36b9577156e033783df8886344de39bba Module:Parameter validation/default config 828 537 1095 1094 2024-03-16T10:46:58Z Motzoid India 2 1 revision imported Scribunto text/plain function create(cat, msg) return mw.ustring.format("{{main other|[[Category:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg) end function create_message(msg) return require('Module:If preview')._warning({ mw.ustring.format("[[templatename]] used with %s.", msg) }) end local options = { ["undeclared"] = create("unknown", 'unknown parameter(s): paramname'), ["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'), ["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'), ["doc-subpage"] = "doc", } local result = { [0] = options, [2] = options, [4] = options, [6] = options, [10] = options, [12] = options, [14] = options, } return result d0fc6166846893f2e0723a5fb53a574cd393a047 Template:High-use 10 538 1097 1096 2024-03-16T10:46:58Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Template:TemplateData header 10 539 1099 1098 2024-03-16T10:46:58Z Motzoid India 2 1 revision imported wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> 748b89c815a11e78b365c5617460ea569f3f96cb Template:Template parameter usage 10 540 1101 1100 2024-03-16T10:46:58Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee a monthly parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}} in articles{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> 83e574f5e031df639a2cdcef5b91d6b1094ae648 Module:High-use 828 541 1103 1102 2024-03-16T10:46:59Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise and not mw.title.getCurrentTitle().isRedirect then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e22649bbbdf0185575aade09174113873db5066a Module:Transclusion count 828 542 1105 1104 2024-03-16T10:46:59Z Motzoid India 2 1 revision imported Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Template:!mxt 10 543 1107 1106 2024-03-16T10:46:59Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|[[:{{#invoke:TEMPLATENAME|main}}]] is only for examples of style and formatting. Do not use it in actual articles.}}|<span class="example deprecated-content example-bad monospaced example-mono" style="font-family: monospace, monospace; color: #8B0000;" {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|Example text}}}</span>}}<!--"monospace, monospace" needed per Wikipedia:Typography#The_monospace_'bug'--><noinclude> {{Documentation|Template:Xt/doc}} <!--This category has to be done on a per-template basis, not in the shared docs, since it only apply to four templates in the family.--> [[Category:Programming typing-aid templates]] </noinclude> 123b663ea682585bd66d348c0b22b9356b6082bb Template:Strongbad 10 544 1109 1108 2024-03-16T10:47:00Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{main other|{{FormattingError|Template:Strongbad is only for use in template documentation, guidelines, and other Wikipedia-internal purposes. Do not use it in actual articles.}}|{{strong|1={{{1}}}|style=color: red; {{{style|}}} |role={{{role|}}} |class={{{class|}}} |id={{{id|}}} |title={{{title|}}} }}}}<noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> 237cc27ab04d4824936787cc35a56e6f706fed71 Module:Lua banner 828 545 1111 1110 2024-03-16T10:47:00Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Parameter names example 828 546 1113 1112 2024-03-16T10:47:00Z Motzoid India 2 1 revision imported Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end --targs['nocat'] = 'yes'; --targs['categories'] = 'no'; --targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p fdf94fb7a5dc1fabf118d60488a02f1e65b0df24 Template:Lua 10 547 1115 1114 2024-03-16T10:47:01Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Parameter names example 10 548 1117 1116 2024-03-16T10:47:01Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 256a11b9ae7ac7e492b3d9de86ade1ffa96bffd1 Template:Clc 10 549 1119 1118 2024-03-16T10:47:01Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Category link with count 10 550 1121 1120 2024-03-16T10:47:02Z Motzoid India 2 1 revision imported wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Tracks Wikidata 10 551 1123 1122 2024-03-16T10:47:02Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Sister project | image = [[File:Wikidata-logo-with-magnifying-glass-icon.svg|40px|link=Wikipedia:Wikidata]] | position = {{{position|}}} | text = This {{template other | template | {{module other | module | {{category other | category | page <!-- not template, module, or category --> }} }} }} [[:Category:{{{cat|Wikidata tracking categories}}}|tracks]] {{#if:{{{section|}}} | one or more [[Wikidata]] properties; see {{Section link||{{{section}}}}} for details. | the [[Wikidata]] propert{{#if:{{{2|}}}|ies:|y:}} {{#invoke:Uses Wikidata|usesProperty}} }} }}<includeonly>{{#switch:{{SUBPAGENAME}} |sandbox |testcases |doc= <!--no category--> |#default = {{template other | [[Category:Templates tracking Wikidata]] | {{module other | [[Category:Modules tracking Wikidata]] | {{category other | <!-- if used in a category, don't automatically add parent category --> | <!-- not template, module, or category --> }} }} }} }}</includeonly><noinclude> {{Documentation}}<!-- Add categories and interwikis to the /doc sub-page --> </noinclude> 42e72b2011b4a187af0427756de66dc2772894cc Template:Param value 10 552 1125 1124 2024-03-16T10:47:02Z Motzoid India 2 1 revision imported wikitext text/x-wiki <code style="border:{{{border|{{{b|thin solid #caa}}}}}};background-color:{{{bg-color|{{{bg|white}}}}}};padding:1px 2px 0 1px;margin:0 2px 0 1px;white-space:nowrap;{{{style|}}}">{{replace|{{replace|{{replace|{{replace|{{replace|<includeonly>⊗ϑ{{{1|}}}⊗ϑ</includeonly><noinclude>value</noinclude>| |{{{space|{{{sp|&nbsp;}}}}}}}}|#|&#35;}}|*|&#42;}}|:|&#58;}}|⊗ϑ|}}</code><noinclude> {{Documentation}} </noinclude> 6298b021570fa18e8e9016184d0b7a3c00563553 Template:Pval 10 553 1127 1126 2024-03-16T10:47:03Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Param value]] 068e5f0a141e534b855634c386541985fd9f0609 Template:Template shortcut 10 554 1129 1128 2024-03-16T10:47:03Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main|template=yes}}</includeonly><noinclude>{{Documentation}}</noinclude> bfb2889c4c0ec36294b7b667f5e03350d2df680e Module:Transclusion count/data/I 828 555 1131 1130 2024-03-16T10:47:03Z Motzoid India 2 1 revision imported Scribunto text/plain return { ["IAST"] = 6700, ["IBDB_name"] = 9200, ["ICD10"] = 4900, ["ICD9"] = 4400, ["ICS"] = 3000, ["IDN"] = 3500, ["IMDb_episode"] = 10000, ["IMDb_episodes"] = 2800, ["IMDb_name"] = 156000, ["IMDb_title"] = 194000, ["IMO_Number"] = 4100, ["IMSLP"] = 8400, ["INA"] = 2200, ["IND"] = 7700, ["INR"] = 6700, ["INRConvert"] = 5900, ["INRConvert/CurrentRate"] = 5800, ["INRConvert/USD"] = 5800, ["INRConvert/out"] = 5800, ["IOBDB_name"] = 2000, ["IP"] = 2700, ["IPA"] = 145000, ["IPA-de"] = 8300, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3900, ["IPA-pl"] = 4100, ["IPA-pt"] = 3300, ["IPA-sl"] = 6900, ["IPA-th"] = 3000, ["IPA_audio_link"] = 3600, ["IPA_link"] = 3800, ["IPAc-cmn"] = 2400, ["IPAc-en"] = 49000, ["IPAc-pl"] = 51000, ["IPC_athlete"] = 3300, ["IPSummary"] = 78000, ["IP_summary"] = 79000, ["IPtalk"] = 18000, ["IPuser"] = 7100, ["IPvandal"] = 2700, ["IRC"] = 7200, ["IRI"] = 2300, ["IRL"] = 5500, ["IRN"] = 3700, ["ISBN"] = 464000, ["ISBN?"] = 2200, ["ISBNT"] = 40000, ["ISBN_missing"] = 2700, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4600, ["ISL"] = 2200, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2800, ["ISO_3166_code"] = 503000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 8300, ["ISP"] = 4600, ["ISR"] = 4900, ["ISSN"] = 12000, ["ISSN_link"] = 31000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 18000, ["ITF"] = 6300, ["ITF_profile"] = 9100, ["ITIS"] = 4500, ["ITN_talk"] = 11000, ["ITN_talk/date"] = 11000, ["IUCN_banner"] = 15000, ["I_sup"] = 4800, ["Ice_hockey"] = 5500, ["Ice_hockey_stats"] = 19000, ["Icehockeystats"] = 12000, ["Icon"] = 588000, ["If"] = 283000, ["If_all"] = 6600, ["If_between"] = 3800, ["If_both"] = 133000, ["If_empty"] = 3760000, ["If_first_display_both"] = 73000, ["If_in_page"] = 12000, ["If_last_display_both"] = 31000, ["If_preview"] = 59000, ["If_then_show"] = 310000, ["Ifempty"] = 4000, ["Ifeq"] = 17000, ["Iferror_then_show"] = 3300, ["Ifexist_not_redirect"] = 1340000, ["Ifnotempty"] = 15000, ["Ifnumber"] = 39000, ["Ifsubst"] = 467000, ["Ih"] = 7600, ["Ill"] = 130000, ["Illm"] = 6500, ["Image_frame"] = 5100, ["Image_label"] = 4500, ["Image_label_begin"] = 3900, ["Image_label_end"] = 3800, ["Image_label_small"] = 2600, ["Image_needed"] = 4900, ["Image_other"] = 271000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 161000, ["Imbox"] = 925000, ["Imdb_name"] = 5300, ["Imdb_title"] = 3300, ["Import_style"] = 12000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 10600000, ["Improve_categories"] = 7800, ["Improve_documentation"] = 2800, ["In_class"] = 5600, ["In_lang"] = 362000, ["In_progress"] = 3300, ["In_string"] = 80000, ["In_title"] = 20000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 26000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 46000, ["Incumbent_pope"] = 4300, ["Indent"] = 4700, ["IndexFungorum"] = 2200, ["Indian_English"] = 4400, ["Indian_Rupee"] = 11000, ["Indian_railway_code"] = 3200, ["Inflation"] = 21000, ["Inflation-fn"] = 5500, ["Inflation-year"] = 4600, ["Inflation/IN/startyear"] = 5800, ["Inflation/UK"] = 4500, ["Inflation/UK/dataset"] = 4500, ["Inflation/UK/startyear"] = 4500, ["Inflation/US"] = 13000, ["Inflation/US-GDP"] = 2500, ["Inflation/US-GDP/dataset"] = 2500, ["Inflation/US-GDP/startyear"] = 2500, ["Inflation/US/dataset"] = 13000, ["Inflation/US/startyear"] = 13000, ["Inflation/fn"] = 6400, ["Inflation/year"] = 27000, ["Info"] = 7100, ["Infobox"] = 3260000, ["Infobox/Columns"] = 2500, ["Infobox/mobileviewfix.css"] = 148000, ["Infobox3cols"] = 17000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5200, ["Infobox_Aircraft_Type"] = 4600, ["Infobox_Athletics_Championships"] = 2800, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2100, ["Infobox_COA_wide"] = 3300, ["Infobox_Canada_electoral_district"] = 2500, ["Infobox_Canadian_Football_League_biography"] = 5700, ["Infobox_Canadian_Football_League_biography/position"] = 5600, ["Infobox_Chinese"] = 21000, ["Infobox_Chinese/Chinese"] = 2800, ["Infobox_Chinese/Footer"] = 8400, ["Infobox_Chinese/Header"] = 8400, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2600, ["Infobox_Gaelic_games_player"] = 5100, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2900, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2600, ["Infobox_Indian_constituency"] = 5200, ["Infobox_Indian_constituency/defaultdata"] = 5200, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_NASCAR_race_report"] = 2300, ["Infobox_NCAA_team_season"] = 17000, ["Infobox_NFL_biography"] = 29000, ["Infobox_NFL_player"] = 7500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 73000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4500, ["Infobox_Olympic_event"] = 7400, ["Infobox_Olympic_event/games_text"] = 7400, ["Infobox_Pan_American_Games_event"] = 2300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2000, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4500, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 19000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3800, ["Infobox_UK_place"] = 26000, ["Infobox_UK_place/NoDialCode"] = 8100, ["Infobox_UK_place/NoPostCode"] = 3300, ["Infobox_UK_place/area"] = 2600, ["Infobox_UK_place/dens"] = 2200, ["Infobox_UK_place/dist"] = 2800, ["Infobox_UK_place/local"] = 26000, ["Infobox_UK_place/styles.css"] = 26000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3900, ["Infobox_US_Supreme_Court_case/courts"] = 3900, ["Infobox_Wikipedia_user"] = 10000, ["Infobox_YouTube_personality"] = 2900, ["Infobox_YouTube_personality/styles.css"] = 2900, ["Infobox_academic"] = 15000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2400, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 163000, ["Infobox_album/color"] = 194000, ["Infobox_album/link"] = 163000, ["Infobox_anatomy"] = 4500, ["Infobox_ancient_site"] = 5600, ["Infobox_animanga/Footer"] = 7000, ["Infobox_animanga/Header"] = 7000, ["Infobox_animanga/Print"] = 5700, ["Infobox_animanga/Video"] = 4800, ["Infobox_architect"] = 3800, ["Infobox_artist"] = 29000, ["Infobox_artist_discography"] = 6000, ["Infobox_artwork"] = 12000, ["Infobox_athlete"] = 2800, ["Infobox_automobile"] = 8500, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3300, ["Infobox_baseball_team_season/season"] = 3300, ["Infobox_baseball_team_season/styles.css"] = 3300, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3100, ["Infobox_basketball_club/styles.css"] = 3100, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4500, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 53000, ["Infobox_boxer"] = 5800, ["Infobox_bridge"] = 6100, ["Infobox_building"] = 28000, ["Infobox_character"] = 7600, ["Infobox_chess_biography"] = 4100, ["Infobox_chess_player"] = 3300, ["Infobox_church"] = 15000, ["Infobox_church/denomination"] = 15000, ["Infobox_church/font_color"] = 15000, ["Infobox_civil_conflict"] = 2500, ["Infobox_civilian_attack"] = 5800, ["Infobox_college_coach"] = 12000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_football_player"] = 2300, ["Infobox_college_sports_team_season"] = 41000, ["Infobox_college_sports_team_season/link"] = 41000, ["Infobox_college_sports_team_season/name"] = 41000, ["Infobox_college_sports_team_season/succession"] = 41000, ["Infobox_college_sports_team_season/team"] = 41000, ["Infobox_comic_book_title"] = 3100, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 84000, ["Infobox_computing_device"] = 2400, ["Infobox_concert"] = 3400, ["Infobox_constituency"] = 5700, ["Infobox_country"] = 6600, ["Infobox_country/formernext"] = 6200, ["Infobox_country/imagetable"] = 5400, ["Infobox_country/multirow"] = 8500, ["Infobox_country/status_text"] = 2800, ["Infobox_country/styles.css"] = 6600, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4800, ["Infobox_court_case/images"] = 2600, ["Infobox_cricket_tournament"] = 2400, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 6600, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4600, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5700, ["Infobox_deity"] = 2100, ["Infobox_deity/color"] = 2000, ["Infobox_designation_list"] = 20000, ["Infobox_designation_list/entry"] = 18000, ["Infobox_dim"] = 7000, ["Infobox_dim/core"] = 7000, ["Infobox_diocese"] = 3900, ["Infobox_drug"] = 10000, ["Infobox_drug/chemical_formula"] = 10000, ["Infobox_drug/data_page_link"] = 10000, ["Infobox_drug/formatATC"] = 10000, ["Infobox_drug/formatCASnumber"] = 10000, ["Infobox_drug/formatChEBI"] = 10000, ["Infobox_drug/formatChEMBL"] = 10000, ["Infobox_drug/formatChemDBNIAID"] = 10000, ["Infobox_drug/formatChemSpider"] = 10000, ["Infobox_drug/formatCompTox"] = 10000, ["Infobox_drug/formatDrugBank"] = 10000, ["Infobox_drug/formatIUPHARBPS"] = 10000, ["Infobox_drug/formatJmol"] = 10000, ["Infobox_drug/formatKEGG"] = 10000, ["Infobox_drug/formatPDBligand"] = 9600, ["Infobox_drug/formatPubChemCID"] = 10000, ["Infobox_drug/formatPubChemSID"] = 10000, ["Infobox_drug/formatUNII"] = 10000, ["Infobox_drug/legal_status"] = 11000, ["Infobox_drug/licence"] = 10000, ["Infobox_drug/maintenance_categories"] = 10000, ["Infobox_drug/non-ref-space"] = 4500, ["Infobox_drug/pregnancy_category"] = 10000, ["Infobox_drug/title"] = 10000, ["Infobox_election"] = 31000, ["Infobox_election/row"] = 31000, ["Infobox_election/shortname"] = 29000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7400, ["Infobox_event"] = 5800, ["Infobox_family"] = 2200, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 159000, ["Infobox_film/short_description"] = 155000, ["Infobox_film_awards"] = 2700, ["Infobox_film_awards/link"] = 2700, ["Infobox_film_awards/style"] = 2700, ["Infobox_food"] = 7000, ["Infobox_football_biography"] = 209000, ["Infobox_football_club"] = 28000, ["Infobox_football_club_season"] = 21000, ["Infobox_football_league"] = 2600, ["Infobox_football_league_season"] = 20000, ["Infobox_football_match"] = 6000, ["Infobox_football_tournament_season"] = 8100, ["Infobox_former_subdivision"] = 3500, ["Infobox_former_subdivision/styles.css"] = 3500, ["Infobox_galaxy"] = 2100, ["Infobox_game"] = 2600, ["Infobox_game_score"] = 3600, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4500, ["Infobox_golfer/highest_ranking"] = 4500, ["Infobox_government_agency"] = 11000, ["Infobox_government_cabinet"] = 2800, ["Infobox_gridiron_football_person"] = 2300, ["Infobox_gridiron_football_person/position"] = 5600, ["Infobox_gymnast"] = 3600, ["Infobox_handball_biography"] = 5000, ["Infobox_historic_site"] = 12000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6400, ["Infobox_hospital/care_system"] = 6400, ["Infobox_hospital/lists"] = 6400, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3100, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5900, ["Infobox_islands"] = 9000, ["Infobox_islands/area"] = 9400, ["Infobox_islands/density"] = 9400, ["Infobox_islands/length"] = 9000, ["Infobox_islands/styles.css"] = 9000, ["Infobox_journal"] = 9800, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9500, ["Infobox_journal/Former_check"] = 9500, ["Infobox_journal/ISO_4_check"] = 9500, ["Infobox_journal/ISSN-eISSN"] = 9500, ["Infobox_journal/Indexing_search"] = 9600, ["Infobox_journal/MathSciNet_check"] = 9500, ["Infobox_journal/NLM_check"] = 9500, ["Infobox_journal/frequency"] = 8700, ["Infobox_lake"] = 4200, ["Infobox_language"] = 9600, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6600, ["Infobox_language/linguistlist"] = 9600, ["Infobox_language/ref"] = 7100, ["Infobox_law_enforcement_agency"] = 2000, ["Infobox_legislation"] = 2000, ["Infobox_legislature"] = 3800, ["Infobox_library"] = 2200, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 7700, ["Infobox_manner_of_address"] = 3400, ["Infobox_mapframe"] = 83000, ["Infobox_martial_artist"] = 5700, ["Infobox_martial_artist/record"] = 5700, ["Infobox_medal_templates"] = 426000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8100, ["Infobox_medical_details"] = 2100, ["Infobox_medical_person"] = 2000, ["Infobox_military_conflict"] = 23000, ["Infobox_military_installation"] = 9900, ["Infobox_military_person"] = 46000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2200, ["Infobox_model"] = 2300, ["Infobox_monument"] = 2100, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2400, ["Infobox_museum"] = 11000, ["Infobox_musical_artist"] = 123000, ["Infobox_musical_artist/color"] = 123000, ["Infobox_musical_artist/hCard_class"] = 319000, ["Infobox_musical_composition"] = 3000, ["Infobox_name"] = 7600, ["Infobox_name_module"] = 7400, ["Infobox_newspaper"] = 9900, ["Infobox_nobility"] = 2300, ["Infobox_noble"] = 7400, ["Infobox_officeholder"] = 228000, ["Infobox_officeholder/office"] = 234000, ["Infobox_official_post"] = 8300, ["Infobox_organization"] = 37000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 7700, ["Infobox_person"] = 492000, ["Infobox_person/Wikidata"] = 4600, ["Infobox_person/height"] = 104000, ["Infobox_person/length"] = 7100, ["Infobox_person/weight"] = 67000, ["Infobox_philosopher"] = 3500, ["Infobox_planet"] = 4700, ["Infobox_play"] = 4100, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3100, ["Infobox_prepared_food"] = 3000, ["Infobox_professional_wrestler"] = 4300, ["Infobox_professional_wrestling_event"] = 2800, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5600, ["Infobox_racing_driver"] = 4300, ["Infobox_racing_driver_series_section"] = 2300, ["Infobox_radio_show"] = 2100, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 3000, ["Infobox_rail_line"] = 7400, ["Infobox_rail_service"] = 3000, ["Infobox_rail_service/doc"] = 3000, ["Infobox_reality_competition_season"] = 3700, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6600, ["Infobox_religious_biography"] = 5500, ["Infobox_religious_building"] = 13000, ["Infobox_religious_building/color"] = 18000, ["Infobox_restaurant"] = 3200, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 22000, ["Infobox_royalty/short_description"] = 12000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 16000, ["Infobox_rugby_league_biography"] = 10000, ["Infobox_rugby_league_biography/PLAYER"] = 9900, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5100, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5700, ["Infobox_school_district/styles.css"] = 5700, ["Infobox_scientist"] = 49000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 564000, ["Infobox_settlement/areadisp"] = 241000, ["Infobox_settlement/columns"] = 96000, ["Infobox_settlement/columns/styles.css"] = 96000, ["Infobox_settlement/densdisp"] = 440000, ["Infobox_settlement/impus"] = 83000, ["Infobox_settlement/lengthdisp"] = 170000, ["Infobox_settlement/link"] = 96000, ["Infobox_settlement/metric"] = 213000, ["Infobox_settlement/pref"] = 296000, ["Infobox_settlement/styles.css"] = 564000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 41000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3500, ["Infobox_short_story"] = 2400, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 77000, ["Infobox_song/color"] = 77000, ["Infobox_song/link"] = 77000, ["Infobox_spaceflight"] = 3600, ["Infobox_spaceflight/styles.css"] = 3600, ["Infobox_sport_event"] = 2200, ["Infobox_sports_competition_event"] = 18000, ["Infobox_sports_competition_event/medalrow"] = 12000, ["Infobox_sports_league"] = 5100, ["Infobox_sports_season"] = 5600, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 109000, ["Infobox_stadium"] = 3200, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3500, ["Infobox_swimmer"] = 9800, ["Infobox_television"] = 58000, ["Infobox_television/Short_description"] = 55000, ["Infobox_television_channel"] = 6300, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9700, ["Infobox_television_station"] = 3500, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2700, ["Infobox_tennis_tournament_event"] = 19000, ["Infobox_tennis_tournament_year"] = 9400, ["Infobox_tennis_tournament_year/color"] = 29000, ["Infobox_tennis_tournament_year/footer"] = 29000, ["Infobox_tournament_season"] = 11000, ["Infobox_train"] = 2300, ["Infobox_university"] = 26000, ["Infobox_user"] = 2700, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 28000, ["Infobox_video_game/styles.css"] = 28000, ["Infobox_volleyball_biography"] = 5500, ["Infobox_weapon"] = 7400, ["Infobox_weather_event"] = 2100, ["Infobox_weather_event/Effects"] = 2100, ["Infobox_weather_event/Footer"] = 2100, ["Infobox_weather_event/History"] = 2000, ["Infobox_weather_event/meteorology"] = 2000, ["Infobox_weather_event/styles.css"] = 2100, ["Infobox_website"] = 7700, ["Infobox_writer"] = 40000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inline"] = 2100, ["Inline_block"] = 4800, ["Inprogress"] = 2500, ["Input_link"] = 32000, ["Instagram"] = 12000, ["Interlanguage_link"] = 169000, ["Interlanguage_link_multi"] = 17000, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2600, ["Intitle"] = 13000, ["Iptalk"] = 17000, ["IranCensus2006"] = 45000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 45000, ["Irc"] = 2100, ["Irish_place_name"] = 2700, ["IsIPAddress"] = 37000, ["IsValidPageName"] = 2700, ["Is_MLB_league"] = 3200, ["Is_NPB_league"] = 3300, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 508000, ["Is_redirect"] = 28000, ["Isbn"] = 8200, ["Isfdb_name"] = 3400, ["Isfdb_title"] = 4300, ["Isnumeric"] = 145000, ["Iso2continent"] = 37000, ["Iso2country"] = 24000, ["Iso2country/article"] = 23000, ["Iso2country/data"] = 24000, ["Iso2nationality"] = 207000, ["Issubst"] = 71000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5300, ["Italic_title"] = 271000, ["Italic_title_prefixed"] = 8700, ["Italics_colon"] = 3900, ["Italictitle"] = 3800, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 125000, ["Ivory_messagebox"] = 148000, ["Module:I18n/complex_date"] = 68000, ["Module:IP"] = 133000, ["Module:IPA"] = 145000, ["Module:IPA/data"] = 131000, ["Module:IPA/styles.css"] = 116000, ["Module:IPA_symbol"] = 5200, ["Module:IPA_symbol/data"] = 5200, ["Module:IPAc-en"] = 49000, ["Module:IPAc-en/data"] = 49000, ["Module:IPAc-en/phonemes"] = 49000, ["Module:IPAc-en/pronunciation"] = 49000, ["Module:IPAddress"] = 189000, ["Module:ISO_3166"] = 1030000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2200, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 9800, ["Module:ISO_3166/data/National"] = 1030000, ["Module:ISO_3166/data/PL"] = 7500, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 25000, ["Module:ISO_3166/data/US"] = 85000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 68000, ["Module:Icon"] = 593000, ["Module:Icon/data"] = 593000, ["Module:If_any_equal"] = 2800, ["Module:If_empty"] = 3760000, ["Module:If_in_page"] = 12000, ["Module:If_preview"] = 303000, ["Module:If_preview/configuration"] = 303000, ["Module:If_preview/styles.css"] = 303000, ["Module:Import_style"] = 12000, ["Module:In_lang"] = 363000, ["Module:Indent"] = 4700, ["Module:Infobox"] = 4180000, ["Module:Infobox/dates"] = 70000, ["Module:Infobox/styles.css"] = 4450000, ["Module:Infobox3cols"] = 301000, ["Module:InfoboxImage"] = 4510000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 422000, ["Module:Infobox_military_conflict"] = 23000, ["Module:Infobox_military_conflict/styles.css"] = 23000, ["Module:Infobox_multi-lingual_name"] = 21000, ["Module:Infobox_multi-lingual_name/data"] = 21000, ["Module:Infobox_power_station"] = 3100, ["Module:Infobox_road"] = 26000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 58000, ["Module:Infobox_television_disambiguation_check"] = 65000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 9200, ["Module:Infobox_television_season_name"] = 9700, ["Module:Internet_Archive"] = 19000, ["Module:IrelandByCountyCatNav"] = 3400, ["Module:Is_article"] = 2000, ["Module:Is_infobox_in_lead"] = 380000, ["Module:Is_instance"] = 329000, ["Module:Italic_title"] = 1130000, ["Module:Italic_title2"] = 5300, } 0199a97163562d13c0b1efae3a972ff61ab41c10 Template:When on basepage 10 556 1133 1132 2024-03-16T10:47:03Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "page" parameter then detect basepage/subpage/subsubpage--> {{#if:{{{page|}}} | {{#if:{{#titleparts:{{{page}}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{{page}}}|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | subpage | basepage }} }} }} | basepage = {{{1|}}} | subpage = {{{2|}}} | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> }}<!--End switch--><noinclude> {{Documentation}} </noinclude> cf4dc92df647a26ab0ce149772a1fe3ac6c3dfc0 Template:Film- and television-related infobox templates 10 557 1135 1134 2024-03-16T10:47:04Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Navbox | name = Film- and television-related infobox templates | title = Film- and television-related infobox templates | listclass = hlist | state = {{{state|autocollapse}}} | group1 = [[Wikipedia:List of infoboxes#Film|Film]] | list1 = * [[Template:Infobox film|Film]] ** [[Template:Infobox film/short description|/short description]] * [[Template:Infobox film or theatre festival|Film or theatre festival]] * [[Template:Infobox art movement|Art movement]] * [[Template:Infobox cinema market|Cinema market]] * [[Template:Infobox movie quote|Movie quote]] | group2 = [[Wikipedia:List of infoboxes#Television|Television]] | list2 = * [[Template:Infobox television|Television]] * [[Template:Infobox television season|Television season]] ** [[Template:Infobox reality competition season|Reality competition season]] * [[Template:Infobox television episode|Television episode]] ** [[Template:Infobox television crossover episode|crossover]] *** [[Template:Infobox television crossover episode/part|/part]] ** ''[[Template:Infobox Doctor Who episode|Doctor Who]]'' ** ''[[Template:Infobox Futurama episode|Futurama]]'' ** ''[[Template:Infobox Simpsons episode|Simpsons]]'' * [[Template:Infobox animanga/Video|Animanga]] | group3 = Misc video | list3 = * ''[[Template:Infobox Paris by Night|Paris by Night]]'' * [[Template:Infobox machinima|Machinima]] | group4 = Industry | list4 = * [[Template:Infobox award|Award]] * [[Template:Infobox awards list|Awards list]] * [[Template:Infobox film awards|Film awards]] ** [[Template:Infobox film awards/link|/link]] ** [[Template:Infobox film awards/style|/style]] * [[Template:Infobox broadcasting network|Broadcasting network]] * [[Template:Infobox television channel|Television channel]] * [[Template:Infobox television station|Television station]] * [[Template:Infobox programming block|Programming block]] * [[Template:Infobox presenter|Presenter]] | group5 = [[Wikipedia:List of infoboxes#Photography|Technical]] | list5 = * [[Template:Infobox camera|Camera]] * [[Template:Infobox movie camera|Movie camera]] * [[Template:Infobox camera mount|Camera mount]] * [[Template:Infobox photographic lens|Photographic lens]] * [[Template:Infobox lens design|Lens design]] * [[Template:Infobox photographic film|Photographic film]] | group6 = [[Wikipedia:List of infoboxes#Fictional elements|Fiction]] | list6 = * [[Template:Infobox fictional artifact|Artifact]] * [[Template:Infobox character|Character]] ** [[Template:Infobox Doctor Who doctor|Doctor Who doctor]] ** [[Template:Infobox G.I. Joe character|''G.I. Joe'']] ** [[Template:Infobox soap character|Soap opera]] * [[Template:Infobox fictional family|Family]] ** [[Template:Infobox fictional family/member|Family member]] * [[Template:Infobox fictional location|Location]] * [[Template:Infobox fictional organisation|Organisation]] * [[Template:Infobox fictional race|Race]] * [[Template:Infobox fictional vehicle|Vehicle]] | group7 = Template modules | list7 = * [[Template:Infobox name module|Name module]] * [[Template:Based on|Based on]] * [[Template:Infobox person|Person]] * [[Template:Listen|Listen]] | group8 = Related | list8 = * [[Template:Infobox advertising|Advertising]] * [[Template:Infobox media franchise|Media franchise]] * [[Template:Infobox audio drama|Audio drama]] * [[Template:Infobox podcast|Podcast]] * [[Template:Infobox radio station|Radio station]] * [[Template:Infobox radio show|Radio show]] }}<noinclude> {{Documentation}} </noinclude> 194d6ca46eda0a7ea7550c9c6dce0440fc9c303e Module:Message box/ombox.css 828 558 1137 1136 2024-03-16T10:47:04Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Template:Basepage subpage 10 559 1139 1138 2024-03-16T10:47:04Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:When on basepage]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 47118a1bed1942b7f143cdff1dec183002fc9f4b Module:Side box/styles.css 828 560 1141 1140 2024-03-16T10:47:05Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Template:UF-hcard-person 10 561 1143 1142 2024-03-16T10:47:05Z Motzoid India 2 1 revision imported wikitext text/x-wiki The HTML markup produced by this template includes an [[HCard|hCard microformat]], which makes the person's details [[Parsing|parsable]] by computers, either acting automatically to catalogue articles across Wikipedia or via a browser tool operated by a reader, to (for example) add the subject to an address book or database. For more information about the use of [[microformat]]s on Wikipedia, please see [[Wikipedia:WikiProject Microformats|the microformat project]]. === Sub-templates === Date-of-birth ("bday") information will only be included in the microformat if {{tl|birth date}}, or {{tl|birth date and age}} are used in the infobox. ([[Wikipedia:WikiProject Microformats/dates|Do not use these if the date is before 1583]]). Be cautious about using these if the person is still living, per [[WP:DOB]]. To include a URL, use {{Tl|URL}}. '''Please do not remove instances of these sub-templates.''' === Classes === hCard uses HTML classes including: {{Flatlist| *adr *agent *bday *birthplace *category *country-name *deathdate *deathplace *extended-address *family-name *fn (required) *given-name *honorific-prefix *honorific-suffix *label *locality *n *nickname *note *org *role *url *vcard }} '''Please do not rename or remove these classes nor collapse nested elements which use them.'''<includeonly>{{#ifeq:{{SUBPAGENAME}}|doc | |{{#ifeq:{{SUBPAGENAME}}|sandbox | |[[Category:Templates generating hCards]]}} }}</includeonly><noinclude> [[Category:Templates generating hCards]] [[Category:Microformat (uF) message templates]] </noinclude> cf7d7c17b9e4a925f11599e609ceb43d23ba29ea Template:Person infobox header 10 562 1145 1144 2024-03-16T10:47:05Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{ombox|type=content|text=The design and content of biographical infoboxes must follow Wikipedia's [[Wikipedia:Verifiability|verifiability policy]], as well as [[Wikipedia:Manual of Style/Infoboxes|infobox]] and [[Wikipedia:Manual of Style/Biography|biographical style guideline]]. All content displayed in this template must adhere to the '''[[Wikipedia:Biographies of living persons|biographies of living persons]]''' policy if applicable. [[Wikipedia:Citing sources|Unsourced or poorly sourced]] contentious material '''must be removed immediately''' from the article and its infobox, especially if potentially [[Wikipedia:Libel|libellous]].}} <noinclude> {{documentation |content= {{no documentation}} [[Category:People and person infobox templates]] }} </noinclude> 8440915f7cf3c89062b5b67dc8a4c985774c3ae3 Template:Infobox person/doc 10 563 1147 1146 2024-03-16T10:47:07Z Motzoid India 2 1 revision imported wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}{{pp-move-indef}}</noinclude>{{for|an infobox for fictional characters|Template:Infobox character}} {{Template shortcut|Personbox}} {{documentation subpage}} {{Person infobox header}} {{High-use|info=About [https://linkcount.toolforge.org/index.php?project=en.wikipedia.org&page=Template:Infobox_person&namespaces=0 410,000] of them (90%) are in mainspace.}} {{Notice|Please note that in 2016, the {{para|religion}} and {{para|ethnicity}} parameters were removed from Infobox person as a result of [[Wikipedia:Village pump (policy)/Archive 126#RfC: Religion in biographical infoboxes|the RfC: Religion in biographical infoboxes]] and [[Wikipedia:Village pump (policy)/Archive 127#RfC: Ethnicity in infoboxes|the RfC: Ethnicity in infoboxes]] as clarified by [[Template talk:Infobox person/Archive 31#Ethnicity? Religion?|this discussion]].}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters|Module:Check for clobbered parameters}} {{Tracks Wikidata|P18|cat=No local image but image on Wikidata}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> {{tl|Infobox person}} may be used to summarize information about a particular person, usually at the top of an article. == Redirects and calls == At least {{PAGESINCATEGORY:Templates calling Infobox person}} other [[:Category:Templates calling Infobox person|templates call this one]] and many templates [{{fullurl:Special:WhatLinksHere/Template:Infobox_person|namespace=10&hidetrans=1&hidelinks=1}} redirect here]. == Modules == The following templates are suitable for use as a "module" in this one: * Templates in [[:Category:Biographical templates usable as a module]] * {{tl|Listen}} * {{tl|Infobox Chinese}} == Usage == The infobox may be added by pasting the template as shown below into an article and then filling in the desired fields. Any parameters left blank or omitted will not be displayed. === Blank template with basic parameters === {{Infobox person | name = ''name'' | image = example-serious.jpg | alt = alt | caption = ''caption'' | birth_name = ''birth_name'' | birth_date = ''birth_date'' | birth_place = ''birth_place'' | death_date = ''death_date'' | death_place = ''death_place'' | nationality = ''nationality'' | other_names = ''other_names'' | occupation = ''occupation'' | years_active = ''years_active'' | known_for = ''known_for'' | notable_works = ''notable_works'' }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em;"> {{Infobox person | name = <!-- defaults to article title when left blank --> | image = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] --> | alt = <!-- descriptive text for use by speech synthesis (text-to-speech) software --> | caption = | birth_name = <!-- only use if different from name --> | birth_date = <!-- {{Birth date and age|YYYY|MM|DD}} for living people supply only the year with {{Birth year and age|YYYY}} unless the exact date is already widely published, as per [[WP:DOB]]. For people who have died, use {{Birth date|YYYY|MM|DD}}. --> | birth_place = | death_date = <!-- {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (DEATH date then BIRTH date) --> | death_place = | nationality = <!-- use only when necessary per [[WP:INFONAT]] --> | other_names = | occupation = | years_active = | known_for = | notable_works = }} </syntaxhighlight> {{Infobox person | name = ''name'' | image = example-serious.jpg | alt = alt | caption = ''caption'' | birth_name = ''birth_name'' | birth_date = ''birth_date'' | birth_place = ''birth_place'' | death_date = ''death_date'' | death_place = ''death_place'' | nationality = ''nationality'' | other_names = ''other_names'' | occupation = ''occupation'' | years_active = ''years_active'' | known_for = ''known_for'' | notable_works = ''notable_works'' }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em;"> {{Infobox person | name = | image = | alt = | caption = | birth_name = | birth_date = | birth_place = | death_date = | death_place = | nationality = | other_names = | occupation = | years_active = | known_for = | notable_works = }} </syntaxhighlight> {{clear}} === Blank template with all parameters === Only the most pertinent information should be included. Please {{em|remove}} unused parameters, and refrain from inserting dubious trivia in an attempt to fill all parameters. {{Parameter names example | _display=italics | honorific_prefix | name | honorific_suffix | image=example-serious.jpg | image_upright=1 | landscape | alt | caption <!--shows placement of parameters, see examples for image--> | native_name | native_name_lang | pronunciation | birth_name | birth_date | birth_place | baptised <!--does not display due to birth date displayed--> | disappeared_date | disappeared_place | disappeared_status | death_date | death_place | death_cause <!--should only be included when the cause of death has significance for the subject's notability--> | body_discovered | resting_place | resting_place_coordinates | monuments | nationality | other_names | siglum | citizenship | education | alma_mater | occupation | years_active | era | employer | organization | agent | known_for | notable_works | style | height | television | title | term | predecessor | successor | party | otherparty | movement | opponents | boards | criminal_charges | criminal_penalty | criminal_status | spouse | partner | children | parents | relatives | family | callsign | awards | website | module | module2 | module3 | module4 | module5 | module6 <!--removed the ... which only saved two lines from being shown--> | signature=<nowiki>signature.jpg</nowiki> |signature_type | signature_size | signature_alt | footnotes }} <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em"> {{Infobox person | honorific_prefix = | name = <!-- defaults to article title when left blank --> | honorific_suffix = | image = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] --> | image_upright = | landscape = <!-- yes, if wide image, otherwise leave blank --> | alt = <!-- descriptive text for use by speech synthesis (text-to-speech) software --> | caption = | native_name = | native_name_lang = | pronunciation = | birth_name = <!-- only use if different from name --> | birth_date = <!-- {{Birth date and age|YYYY|MM|DD}} for living people supply only the year with {{Birth year and age|YYYY}} unless the exact date is already widely published, as per [[WP:DOB]]. For people who have died, use {{Birth date|YYYY|MM|DD}}. --> | birth_place = | baptised = <!-- will not display if birth_date is entered --> | disappeared_date = <!-- {{Disappeared date and age|YYYY|MM|DD|YYYY|MM|DD}} (disappeared date then birth date) --> | disappeared_place = | disappeared_status = | death_date = <!-- {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (enter DEATH date then BIRTH date (e.g., ...|1967|8|31|1908|2|28}} use both this parameter and |birth_date to display the person's date of birth, date of death, and age at death) --> | death_place = | death_cause = <!-- should only be included when the cause of death has significance for the subject's notability --> | body_discovered = | resting_place = | resting_place_coordinates = <!-- {{coord|LAT|LONG|type:landmark|display=inline}} --> | burial_place = <!-- may be used instead of resting_place and resting_place_coordinates (displays "Burial place" as label) --> | burial_coordinates = <!-- {{coord|LAT|LONG|type:landmark|display=inline}} --> | monuments = | nationality = <!-- use only when necessary per [[WP:INFONAT]] --> | other_names = | siglum = | citizenship = <!-- use only when necessary per [[WP:INFONAT]] --> | education = | alma_mater = | occupation = | years_active = | era = | employer = | organization = | agent = <!-- discouraged in most cases, specifically when promotional, and requiring a reliable source --> | known_for = | notable_works = <!-- produces label "Notable work"; may be overridden by |credits=, which produces label "Notable credit(s)"; or by |works=, which produces label "Works"; or by |label_name=, which produces label "Label(s)" --> | style = | height = <!-- "X cm", "X m" or "X ft Y in" plus optional reference (conversions are automatic) --> | television = | title = <!-- formal/awarded/job title. The parameter |office=may be used as an alternative when the label is better rendered as "Office" (e.g. public office or appointments) --> | term = | predecessor = | successor = | party = | otherparty = | movement = | opponents = | boards = | criminal_charges = <!-- criminality parameters should be supported with citations from reliable sources --> | criminal_penalty = | criminal_status = | spouse = <!-- use article title or common name --> | partner = <!-- (unmarried long-term partner) --> | children = | parents = <!-- overrides mother and father parameters --> | mother = <!-- may be used (optionally with father parameter) in place of parents parameter (displays "Parent(s)" as label) --> | father = <!-- may be used (optionally with mother parameter) in place of parents parameter (displays "Parent(s)" as label) --> | relatives = | family = | callsign = <!-- amateur radio, use if relevant --> | awards = | website = <!-- {{URL|example.com}} --> | module = | module2 = | module3 = | module4 = | module5 = | module6 = | signature = | signature_type = | signature_size = | signature_alt = | footnotes = }} </syntaxhighlight> <syntaxhighlight lang="wikitext" style="overflow:auto; line-height:1.2em"> {{Infobox person | honorific_prefix = | name = | honorific_suffix = | image = | image_upright = | landscape = | alt = | caption = | native_name = | native_name_lang = | pronunciation = | birth_name = | birth_date = | birth_place = | baptised = | disappeared_date = | disappeared_place = | disappeared_status = | death_date = | death_place = | death_cause = | body_discovered = | resting_place = | resting_place_coordinates = | burial_place = | burial_coordinates = | monuments = | nationality = | other_names = | siglum = | citizenship = | education = | alma_mater = | occupation = | years_active = | era = | employer = | organization = | agent = | known_for = | notable_works = | style = | height = | television = | title = | term = | predecessor = | successor = | party = | otherparty = | movement = | opponents = | boards = | criminal_charges = | criminal_penalty = | criminal_status = | spouse = | partner = | children = | parents = | mother = | father = | relatives = | family = | callsign = | awards = | website = | module = | module2 = | module3 = | module4 = | module5 = | module6 = | signature = | signature_type = | signature_size = | signature_alt = | footnotes = }} </syntaxhighlight> {{clear}} == Parameters == {{large|Do not use all these parameters for any one person. The list is long to cover a wide range of people. Only use those parameters that convey essential or notable information about the subject, and ensure that this information is sourced in the article or (if present only in the infobox) in the infobox itself}} Any parameters left blank or omitted will not be displayed. Many parameters have alternative names, implemented for compatibility with other templates (especially to aid merging). The preferred names are shown in the table below. {| class="wikitable" ! Parameter ! Explanation |- | {{mono|honorific_prefix}} | To appear on the line above the person's name. This is for honorifics of serious significance that are attached to the name in formal address, such as knighthoods, "The Honourable", and "His/Her Excellency"; do not use it for routine things like "{{!mxt|[[Dr.]]}}" or "{{!mxt|[[Ms.]]}}" |- | {{mono|name}} | Common name of person (defaults to article name if left blank; provide {{para|birth_name}} (below) if different from {{para|name}}). If middle initials are specified (or implied) by the lead of the article, and are not specified separately in the {{para|birth_name}} parameter, include them here. ''Do not put honorifics or alternative names in this parameter.'' There are separate parameters for these things, covered below. |- | {{mono|honorific_suffix}} | To appear on the line below the person's name. This is for things like {{para|honorific_suffix|[[Officer of the Order of the British Empire|OBE]]}} – honorifics of serious significance that are attached to the name in formal address, such as national orders and non-honorary doctorates; do not use it for routine things like "{{!mxt|[[Bachelor of Arts|BA]]}}". It is permissible but not required to use the {{tlx|post-nominals}} template inside this parameter; doing so requires {{tlx|post-nominals|size{{=}}100%|...}}. |- | {{mono|image}} | Image name: {{pval|abc.jpg}}, {{pval|xpz.png}}, {{pval|123.gif}}, etc., without the {{code|File:}} or {{code|Image:}} prefix. If an image is desired but not available, one may add {{pval|yes}} to the {{para|needs-photo}} parameter of the {{tlx|WikiProject Biography}} template on the talk page. If no image is available yet, [[Wikipedia:Centralized discussion/Image placeholders|do not use an image placeholder]]. See [[#Image]] for further guidelines. |- | {{mono|image_upright}} | Scales the image thumbnail from its default size by the given factor. Values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | {{mono|landscape}} | Set to <code>yes</code> when using wide, short images. The image height (rather than width) will be limited to 200 pixels. |- | {{mono|alt}} | Descriptive [[Wikipedia:Manual of Style/Accessibility/Alternative text for images|{{code|alt}} text for the image]], for visually impaired readers. One word (such as {{pval|photograph}}) is rarely sufficient. Do not copy-paste the value of {{para|caption}} (below) into this parameter. Example of the difference: "Willie Nelson at a concert in Dallas, 1989" is good as {{para|caption}} value; "Nelson in western-wear with an acoustic guitar, on stage in a daytime show with band in background" is an {{para|alt}} description. If nothing meaningful can be said that isn't already in the caption, use the [[Wikipedia:Manual of Style/Accessibility/Alternative text for images#Captions and nearby text|stock text]] {{para|alt|refer to caption}}. |- | {{mono|caption}} | Caption for image, if needed. Try to include the date of photo, some context (check the <code>File:</code> or [[Wikimedia Commons|Commons]] page for the image). Image credit should generally not be included per [[MOS:CREDITS]]. |- | {{mono|native_name}} | The person's name in their own language, if different. |- | {{mono|native_name_lang}} | [[ISO 639-1]] code, e.g., "{{pval|fr}}" for French. If more than one, use {{tlx|lang}} around each name in {{para|native_name}} instead. |- | {{mono|pronunciation}} | Details of how to pronounce the individual's native name. <!--copied from TemplateData description, if changed please update there also--> |- | {{mono|birth_name}} | Name at birth; only use if different from {{para|name}}. |- | {{mono|birth_date}} | Date of birth: Use {{tlx|birth date and age}} (if living) or {{tlx|birth date}} (if dead). {{crossref|See template's page for details on usage.}} If only a year of birth is known, or age as of a certain date, consider using {{tlx|birth year and age}} or {{tlx|birth based on age as of date}}. For living people [[Wikipedia:Biographies of living persons#Privacy of personal information and using primary sources|supply only the year unless the exact date is already widely published]]. Treat such cases as if only the year is known, so use {{tlx|birth year and age}} or a similar option. The templates mentioned in this paragraph emit metadata indicating the date is in the Gregorian calendar; if the date is in the Julian calendar, do not use these templates, just write the date. |- | {{mono|{{vanchor|birth_place}}}} | Place of birth: {{var|city}}, {{var|administrative region}}, {{var|country}}. * Use the name of the birthplace at the time of birth, e.g.: {{pval|Saigon}} (prior to 1976) or {{pval|Ho Chi Minh City}} (post-1976). * [[Wikipedia:Manual of Style/Icons#Do not use flags to indicate locations of birth, residence, or death|Do not use a flag template]], coat of arms, or other icon. * [[Wikipedia:Manual of Style/Infoboxes#Purpose|Omit unnecessary or redundant details]]. For example, it is not necessary to state: {{!xt|{{pval|New York City, [[New York (state)|New York]], United States}}}} when {{xt|{{pval|New York City, U.S.}}}} conveys essentially the same information more concisely. * Countries should [[Wikipedia:Manual of Style/Linking#What generally should not be linked|generally not be linked]]. * For modern subjects, the country should generally be a sovereign state; for United Kingdom locations, the constituent [[Countries of the United Kingdom|countries of the UK]] are sometimes used instead, when more appropriate in the context. * For historical subjects, use the place name most appropriate for the context and our readership. What the place may correspond to on a modern map is a matter for an article's main text. * For union republics, subordinate country can be shown: {{!xt|{{pval|Moscow, [[Russian SFSR]], Soviet Union}}}}. * For subsequent places (of death, etc.) it is not necessary to repeat jurisdictional details or links for the same place name. |- | {{mono|baptised}} | Date of baptism: {{em|Only}} for use when birth date is not known (e.g., for [[Ludwig van Beethoven]]). Will not display if a birth date is entered. Do not use subtemplates. Parameter <code>baptized</code> can be used for articles that use American English spelling. |- | {{mono|disappeared_date}} | (For missing people) Date of disappearance: Use {{tlx|disappeared date and age}} (if birth date is known) or {{tlx|disappeared date}} (if birth date unknown). |- | {{mono|disappeared_place}} | (For missing people) Place of disappearance: {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp;<!--This space is needed for readability, due to quirk of these templated elements being in proximity.--> ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|disappeared_status}} | (For missing people) Current status for the person, e.g., if the person is still regarded as missing (using {{tlx|missing for}} to calculate the time since disappearance), or if the person has been [[Declared death in absentia|declared dead ''{{lang|la|in absentia}}'']], with a date for such a ruling. |- | {{mono|death_date}} | Date of death: Use {{tlx|death date and age}} (if birth date is known) or {{tlx|death date}} (if birth date unknown). {{crossref|See template's page for details on usage.}} If exact dates are unknown, consider using {{tlx|death year and age}}. The templates mentioned in this paragraph emit metadata indicating the date is in the Gregorian calendar; if the date is in the Julian calendar, do not use these templates, just write the date. |- | {{mono|death_place}} | Place of death: {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|death_cause}} | Cause of death. Should be clearly defined and sourced, and should only be included when the cause of death has significance for the subject's notability, e.g. [[James Dean]], [[John Lennon]]. It should not be filled in for unremarkable deaths such as those from old age or routine illness, e.g. [[Bruce Forsyth]], [[Eduard Khil]]. |- | {{mono|body_discovered}} | Place where the body was discovered (if different from place of death). {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|burial_place}} | Place of burial {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc. {{crossref|See {{para|resting_place}} for non-burials}}.) |- | {{mono|burial_coordinates}} | Coordinates for place of burial, to accompany {{para|burial_place}}. Use {{tlx|coord}} template. |- | {{mono|resting_place}} | Location of columbarium, ash-scattering, etc. If no location, leave blank. {{var|city}}, {{var|administrative region}}, {{var|country}}.&nbsp; ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, redundancy, anachronisms, "country" definitions, etc.) |- | {{mono|resting_place_coordinates}} | Coordinates for location of columbarium, ash-scattering etc. Use {{tlx|coord}} template. |- | {{mono|monuments}} | Significant monuments erected, buildings named, etc., in honour of the subject. If many, link to an appropriate section of the article instead. |- | {{mono|nationality}} | {{anchor|nationality}}May be used instead of {{para|citizenship}} (below) or vice versa in cases where any confusion could result. Should only be used {{em|with}} {{para|citizenship}} when they differ per [[WP:INFONAT]]. Do not put religion or ethnicity in this field. ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, anachronisms, "country" definitions, etc.) |- | {{mono|other_names}} | Other notable names for the person, if different from {{para|name}} and {{para|birth_name}}. [[Wikipedia:Manual of Style/Biographies#Pseudonyms|This can include]] stage names, maiden/married names, nicknames, criminal aliases, etc. |- | {{mono|siglum}} | [[Siglum]] or monogram, a text shortcut (often formed from the initials of the name, with variations) used to sign work, if relevant. |- | {{mono|citizenship}} | Country of legal citizenship, if different from nationality. Rarely needed. See usage notes for {{para|nationality}}, above. Should only be used if citizenship differs from the value in {{para|nationality}} and cannot be inferred from the birthplace. Note that many countries do not automatically grant citizenship to people born within their borders. Do not put religion or ethnicity in this field. ({{crossref|See {{para|birth_place}}, [[#birth place|above]], for instructions on how to use this parameter}}, including: no flag templates, inappropriate linking, anachronisms, "country" definitions, etc.) |- | {{mono|education}} | Education, e.g., degree, institution and graduation year, if relevant. If very little information is available or relevant, the {{para|alma_mater}} parameter may be more appropriate. |- | {{mono|alma_mater}} | ''[[Alma mater]]''. This parameter is a more concise alternative to (not addition to) {{para|education}}, and will often consist of the linked name of the last-attended institution of higher education (not secondary schools). It is usually not relevant to include either parameter for non-graduates, but article talk page consensus may conclude otherwise, as perhaps at [[Bill Gates]]. |- | {{mono|occupation}} | Occupation(s) as given in the lead. Use list markup for three or more entries, e.g. with {{tlx|flatlist}}. Please observe [[sentence case]] and capitalise only the first letter of the first item; e.g.: {{block indent|1={{Flatlist| * Musician * singer-songwriter * actor }}}} |- | {{mono|years_active}} | Date range in years during which the subject was active in their principal occupation(s) and/or other activity for which they are notable. Use the format {{code|1950–2000}}, or {{code|1970–present}} if still active. [[Wikipedia:Manual of Style/Dates and numbers#Ranges|Date ranges]] always use an [[Wikipedia:Manual of Style#En dashes|en dash]], not hyphen. If no dates of birth and/or death are known for the subject, only a ''[[floruit]]'' date range, as is common with ancient subjects, this parameter can be used for it. If approximate (''[[wikt:circa#English|circa]]'') dates are known for either or both, put them in the {{para|birth_date}} and {{para|death_date}} parameters. Helpful templates: {{tlx|floruit}}, {{tlx|circa}}. |- | {{mono|era}} | Era (e.g., {{pval|Medieval}}) in which the person lived; less specific than {{para|years_active}}. Should not be used if dates are available. |- | {{mono|employer}} | Employer(s), if relevant. |- | {{mono|organization}} or {{mono|organisation}} | Non-employing organization(s), if relevant. |- | {{mono|agent}} | The subject's agent (individual and/or agency), discouraged in most cases, specifically when promotional, and requiring a [[Wikipedia:Identifying reliable sources|reliable source]]. |- | {{mono|known_for}} | A brief description of why the person is notable. |- | {{ubl|{{mono|notable_works}};<br/>&nbsp;&nbsp;{{small|alternatives:}} |{{mono|credits}} |{{mono|label_name}} |{{mono|works}} }} | Title(s) of notable work(s) (publications, compositions, sculptures, films, etc.) by the subject, if any. Produces the label '''Notable work'''. May be overridden by {{para|credits}}, which produces '''Notable credit(s)'''; or by {{para|works}}, which produces '''Works'''; or by {{para|label_name}}, which produces '''Label(s)'''. * The {{para|notable_works}}, {{para|credits}}, and {{para|label_name}} parameters are intended to be (at most) short [[#Inline lists|inline lists]]. * The {{para|label_name}} variant is used for one or more record labels with which a performer is associated, or a fashion label in which a designer has been heavily involved or for which they are well known. Remember that this parameter is an alternative to the others mentioned here and is not used along with them. * The {{para|works}} variant is intended to link to {{em|a specific list article}} for a larger body of work (not all of which may be individually notable). |- | {{mono|style}} | The style of the subject's works, if applicable. {{crossref|This parameter is not for [[Style (manner of address)|styles of address or office]]; see {{para|honorific_prefix}}.}} |- | {{mono|height}} | If person was notable for their height, or if height is relevant. If used, this should also include the year of the measurement if the person had not reached full adulthood when this stat was published. {{crossref|See documentation of this parameter at [[Template:Infobox sportsperson#height|Template:Infobox sportsperson]] for more information.}} |- | {{mono|television}} | Television programmes presented by or {{em|closely}} associated with the subject. For multiple entries, use an [[#Inline lists|inline list]]. |- | {{mono|title}} | Multiple uses: * Formal title, such as {{pval|First Lady of Japan}} for [[Akie Abe]]. * Awarded title, such as {{pval|Mr. Olympia}} for [[Arnold Schwarzenegger]]. * Job title, such as {{pval|President of Calvin College}} for [[Anthony Diekema]]. * A combination of the above, such as {{pval|Professor of Mathematics}} and {{pval|[[Fellow of the Royal Society]]}} for [[Bill Parry (mathematician)|Bill Parry]] For multiple entries, use an [[#Inline lists|inline list]]. Use the {{para|awards}} parameter, below, for awarded honors that are not really titles. A single award should not use both parameters. |- | {{mono|office}} | May be used as an alternative to {{para|title}} when the label is better displayed as '''Office''' (e.g. public office or appointments). Using this parameter will override {{para|title}}. |- | {{mono|term}} | Years the person held the {{para|title}} or {{para|office}} listed above. Helpful template: {{tlx|reign}} (also used for civil offices). |- | {{mono|predecessor}} | Person who previously held the {{para|title}} or {{para|office}} listed above. |- | {{mono|successor}} | Person who subsequently held the {{para|title}} or {{para|office}} listed above. |- | {{mono|party}} | If relevant. Field labelled '''Political party'''. |- | {{mono|otherparty}} | If relevant. Field labelled '''Other political affiliations'''. |- | {{mono|movement}} | If relevant. Can be [[Social movement|social]], [[Political movement|political]] (non-party), [[Art movement|artistic]], [[Philosophical movement|philosophical]], [[List of literary movements|literary]], [[Cultural movement|cultural]], etc. |- | {{mono|opponents}} | Notable relevant opponents (e.g., for major political office). |- | {{mono|boards}} | For [[board of directors]] membership(s), if relevant. Field labeled '''Board member&nbsp;of'''. |- | {{ubl|{{mono|criminal_charges}}|{{mono|criminal_penalty}}|{{mono|criminal_status}}}} | For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body. |- | {{mono|spouse}} | Name of spouse(s), followed by years of marriage. Use the format ''Name (married 1950–present)'' for a current spouse, and ''Name (married 1970–1999)'' for former spouse(s). Use article title (if linking) or [[Wikipedia:Article titles#Use commonly recognizable names|common name]]. For multiple entries, use an [[#Inline lists|inline list]]. For deceased persons still married at time of death, do not include the end year. |- | {{mono|partner}} | If particularly relevant, or if the partner is notable; "partner" here means unmarried life partners in a [[domestic partnership]] (of any gender or sexual orientation), not business partner. Use the format ''Name (1950–present)'' for current partner and ''Name (1970–1999)'' for former partner(s). |- | {{mono|children}} | Typically the number of children (e.g., {{pval|3}}); only list names of independently notable or particularly relevant children. Names may be preceded by a number to show total children and avoid implying that named children are the only offspring. For multiple entries, use an [[#Inline lists|inline list]]. {{em|For [[Wikipedia:Biographies of living persons#Privacy of names|privacy reasons]], consider omitting the names of living children, unless notable.}} |- | {{mono|parents}} | Names of parents; include only if they are independently notable or particularly relevant. For multiple entries, use an [[#Inline lists|inline list]]. If subject has only one notable mother and/or only one notable father, {{para|mother}} and {{para|father}} parameters may be used instead. These parameters may be used for biological, adoptive, foster, or step-parents. |- | {{mono|mother}} | Name of mother; include only if subject has one mother who is independently notable or particularly relevant. Displays '''Parent(s)''' as label, and is overridden by the {{para|parents}} parameter. |- | {{mono|father}} | Name of father; include only if subject has one father who is independently notable or particularly relevant. Displays '''Parent(s)''' as label, and is overridden by the {{para|parents}} parameter. |- | {{mono|relatives}} | Names of siblings or other relatives; include only if independently notable and particularly relevant. Include the relationship in parentheses after the name (sister, uncle, etc.). For multiple entries, use an [[#Inline lists|inline list]]. |- | {{mono|callsign}} | Amateur radio [[call sign]], if relevant. |- | {{mono|awards}} | Notable awards. If many, link to an appropriate section of the article instead. Use {{para|title}} parameter, above, for awarded titles; A single award should not use both parameters. |- | {{mono|website}} | Official website only. Unofficial websites should be placed under <code><nowiki>==External links==</nowiki></code> in the body of the article. Use {{tlx|URL}} as in {{tnull|URL|Example.com}}. Do not display the {{samp|www.}} part unless the site requires it. |- | {{mono|template_name}} | Used when {{tl|Infobox person}} is wrapped by another template. This would be the (lower-case) name of the wrapping template, without the "Template:" prefix. |- | {{ubl | {{mono|module}} | {{mono|module2}} | {{mono|module3}} | {{mono|module4}} | {{mono|module5}} | {{mono|module6}} }} | Used for embedding other infoboxes into this one. Example: <syntaxhighlight lang="wikitext"> {{Infobox person | name = Paul McCartney ... | module = {{Infobox musical artist | embed = yes | instrument = piano ... }} <!-- end of Infobox musical artist --> ... }} <!-- end of Infobox person --> </syntaxhighlight> {{crossref|For more detailed information, see [[Wikipedia:WikiProject Infoboxes/embed]].}} |- | {{mono|signature}} | An image of the person's signature. Please use image name: {{pval|abc.jpg}}, {{pval|xpz.png}}, {{pval|123.gif}}, etc., without the {{samp|File:}} or {{samp|Image:}} prefix |- | {{mono|signature_type}} | Changes the '''Signature''' label to the preferred argument, such as '''Seal''' |- | {{mono|signature_size}} | Default is {{samp|150px}}. If necessary, a signature can be resized manually as per the {{para|image_size}} parameter. |- | {{mono|signature_alt}} | Alt text for the signature image. For example, for {{samp|[[:File:Thomas Jefferson Signature.svg]]}}, the alt text might be {{para|signature_alt| Th: Jefferson}}, spelling out the signature exactly as it appears in the image. |- | {{mono|footnotes}} | Textual notes about any of the infobox data. This is not for reference citations. If an infobox parameter's value needs a citation, [[Wikipedia:Citing sources|cite inline]] at the end of the value. Citations will appear in the article's references section along with the other citations in the article. |- | {{mono|image_size}} | {{strongbad|Deprecated}}. Size to display image: {{pval|200px}} (set width), {{pval|x300px}} (set height), or {{pval|200x300px}} (max width & max height). If empty or omitted, this defaults to {{samp|frameless}} (default is {{samp|220px}}, but logged-in users can change this by clicking on "my preferences" and adjusting thumbnail size). [[Wikipedia:Image use policy#Displayed image size|Use of this parameter is discouraged]]. Use image_upright instead. Do not use "{{!mxt|×}}" or capital "{{!mxt|X}}" |} === Additional parameter usage explanation === ==== Image ==== The image in the infobox should be representative of the person who is the subject of the article. For some historical figures, particularly those born in the 18th century or before, this image is often a painting or other artistic depiction of the individual (see [[George Washington]]). Persons born in the 20th century onward, such as [[Barack Obama]], are most often represented by a photograph of the individual. When the subject of a biographical article has recently died, particularly those who have been publicly known for decades, editors may come to a consensus on the article's talk page regarding what image would best be suited for the infobox. An example of such a discussion can be found in the talk page archives for [[Elizabeth II]] (section [[Talk:Elizabeth II/Archive 45#Infobox photograph for after her death|Infobox photograph for after her death]]); in this instance, the 2015 photograph of Elizabeth II that was present in the article's infobox when discussions began was eventually replaced with a photograph of her taken in 1958. === Inline lists === {{Main|WP:Manual of Style/Lists#Horizontal lists|WP:Manual of Style/Lists#Unbulleted lists}} Parameters with multiple values should be formatted with inline-list templates. '''Horizontal''' ones include {{tlx|hlist}} or {{tlx|flatlist}}. In [[Wikipedia:Manual of Style/Lists#Horizontal lists|horizontal style]], only the first item is capitalized (aside from [[Wikipedia:Manual of Style/Capital letters#Proper names|proper names]]). This style is best for short items, and few of them. Mid-dots, commas or semicolons are available as separators (use semicolons or mid-dots if any items contain their own commas). For example: * {{para|parameter_name|{{tlp|hlist |Foo |bar |baz}}}} → {{hlist |Foo |bar |baz}} * {{para|parameter_name|{{tlp|cslist |Foo |bar |baz}}}} → {{cslist |Foo |bar |baz}} * {{para|parameter_name|{{tlp|cslist |Foo, fee |bar, bor |baz, biz |semi=true}}}} → {{cslist |Foo, fee |bar, bor |baz, biz |semi=true}} Horizontal list example with {{tlx|hlist|Item one|item two|item three}}: {{hlist|Item one|item two|item three}} '''Vertical''' templates are {{tlx|plainlist}} and {{tlx|unbulleted list}} (vertical), use [[Wikipedia:Manual of Style/Lists#Unbulleted lists|unbulleted, non-indented lists]] for clean display in infoboxes. Entries may be all [[sentence case]], or all lowercase (aside from proper names) after the first. This style is best for long items, and longer lists. For long lists of information that may not be of immediate interest but retained for reference, the {{tlx|collapsible list}} template can be used; this is not a universally accessible option, so should not be used for key information. ''[[Wikipedia:Manual of Style/Lists#Line breaks|Do not use {{tag|br|s}} markup]]'' to create fake lists, as in: {{!mxt|<nowiki>Item one<br />item two<br />item three</nowiki>}}. Vertical list example:, using {{tlx|unbulleted list|Item one|item two|item three}}: {{unbulleted list|Item one|item two|item three}} == Example == {{Infobox person{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}} | name = Bill Gates | post-nominals = | image = Bill Gates 2017 (cropped).jpg | alt = Head and shoulders photo of Bill Gates | caption = Gates in 2017 | birth_name = William Henry Gates III | birth_date = {{birth date and age|1955|10|28}} | birth_place = [[Seattle, Washington]], U.S. | known_for = Co-founder of [[Microsoft]] and [[Bill & Melinda Gates Foundation]] | education = [[Harvard University]] (dropped out) | occupation = {{hlist|Software developer|investor|entrepreneur}} | years_active = 1972–present | title = {{indented plainlist| * Co-[[chairperson]] of the Bill & Melinda Gates Foundation * Chairman and founder of [[Branded Entertainment Network]] * Chairman and founder of [[Cascade Investment]] * Chairman and co-founder of [[TerraPower]] * Founder of [[Breakthrough Energy]] * Technology advisor of Microsoft}} | boards = {{plainlist| *[[Berkshire Hathaway]] *Microsoft (former, both)}} | spouse = {{marriage|[[Melinda French]]|January 1, 1994|August 2, 2021|reason=divorce}} | children = 3 | father = [[Bill Gates Sr.]] | mother = [[Mary Maxwell Gates|Mary Maxwell]] | website = {{URL|https://www.gatesnotes.com}} | awards = {{ubl|[[Presidential Medal of Freedom]] (2016)|[[Hilal-e-Pakistan]] (2022)}} | signature = Bill Gates signature.svg | signature_alt = William H. Gates III }} <syntaxhighlight lang="wikitext" style="overflow: auto"> {{Infobox person | name = Bill Gates | post-nominals = | image = Bill Gates 2017 (cropped).jpg | alt = Head and shoulders photo of Bill Gates | caption = Gates in 2017 | birth_name = William Henry Gates III | birth_date = {{birth date and age|1955|10|28}} | birth_place = [[Seattle, Washington]], U.S. | known_for = Co-founder of [[Microsoft]] and [[Bill & Melinda Gates Foundation]] | education = [[Harvard University]] (dropped out) | occupation = {{hlist|Software developer|investor|entrepreneur}} | years_active = 1972–present | title = {{indented plainlist| * Co-[[chairperson]] of the Bill & Melinda Gates Foundation * Chairman and founder of [[Branded Entertainment Network]] * Chairman and founder of [[Cascade Investment]] * Chairman and co-founder of [[TerraPower]] * Founder of [[Breakthrough Energy]] * Technology advisor of Microsoft}} | boards = {{plainlist| *[[Berkshire Hathaway]] *Microsoft (former, both)}} | spouse = {{marriage|[[Melinda French]]|January 1, 1994|August 2, 2021|reason=divorce}} | children = 3 | father = [[Bill Gates Sr.]] | mother = [[Mary Maxwell Gates|Mary Maxwell]] | website = {{URL|https://www.gatesnotes.com}} | awards = {{ubl|[[Presidential Medal of Freedom]] (2016)|[[Hilal-e-Pakistan]] (2022)}} | signature = Bill Gates signature.svg | signature_alt = William H. Gates III }} </syntaxhighlight> == Microformat == {{UF-hcard-person}} {{clear}} == TemplateData == {{TemplateData header}} <div style="width:auto; overflow:scroll"> <templatedata> { "description": "An infobox for articles about people", "format": "{{_\n| __________________ = _\n}}\n", "params": { "honorific_prefix": { "description": "Honorific prefix(es), to appear on the line above the person's name", "label": "Honorific prefix", "aliases": [ "honorific-prefix", "honorific prefix", "pre-nominals" ] }, "name": { "description": "Common name of person (defaults to article name if left blank; provide birth_name (below) if different from name). If middle initials are specified (or implied) by the lead of the article, and are not specified separately in the birth_name field, include them here.", "label": "Name", "type": "string", "suggested": true }, "honorific_suffix": { "description": "Honorific suffix(es), to appear on the line below the person's name", "label": "Post-nominals", "aliases": [ "honorific-suffix", "honorific suffix", "post-nominals" ] }, "image": { "description": "Image name: abc.jpg, xpz.png, 123.gif, etc. If an image is desired but not available, one may add \"yes\" to the \"needs-photo\" section of the :Template:WPBiography on the talkpage. If no image is available yet, do not use an image placeholder.", "label": "Image", "example": "abc.jpg, xpz.png, 123.gif", "type": "wiki-file-name", "suggested": true }, "image_size": { "description": "DEPRECATED/DISCOURAGED. Size to display image: 200px (set width), x300px (set height), or 200x300px (max width & max height). This defaults to frameless (default is 220px, but logged in users can change this by clicking on \"my preferences\" and adjusting thumbnail size) if empty or omitted. Use of this parameter is discouraged as per WP:IMGSIZE. Use image_upright instead.", "label": "DEPRECATED: Image size", "aliases": [ "image size", "imagesize" ], "example": "200px", "default": "220px", "deprecated": "DEPRECATED: Use of this parameter is discouraged as per WP:IMGSIZE. Delete it when encountered and use image_upright instead." }, "alt": { "description": "Alt text for image, for visually impaired readers. One word (such as \"photograph\") is rarely sufficient. See WP:ALT.", "label": "Alt", "type": "string" }, "caption": { "description": "Caption for image, if needed. Try to include date of photo and the photographer.", "label": "Caption", "aliases": [ "image caption", "image_caption" ], "type": "string" }, "native_name": { "description": "The person's name in their own language, if different.", "label": "Native name", "type": "string" }, "native_name_lang": { "description": "ISO 639-1 code, e.g., \"fr\" for French. If more than one, use Template:lang in `native_name` instead.", "label": "Native name language" }, "pronunciation": { "description": "Details of how to pronounce the individual's native name.", "label": "Native name pronunciation" }, "birth_name": { "description": "Name at birth; only use if different from name.", "label": "Birth name", "aliases": [ "birthname" ], "type": "string" }, "birth_date": { "description": "Date of birth: {{Birth date and age|YYYY|MM|DD}} for living people. For people who have died, use {{Birth date|YYYY|MM|DD}}. If only a year of birth is known, or age as of a certain date, consider using Template:birth year and age or Template:birth based on age as of date.", "label": "Birth date", "type": "content" }, "birth_place": { "description": "Place of birth: city, administrative region, sovereign state. Use the name of the birthplace at the time of birth, e.g.: Saigon (prior to 1976), Ho Chi Minh City (post 1976). Do not use a flag template.", "label": "Birth place", "type": "string" }, "baptised": { "description": "Date of baptism: ONLY for use when birth date is not known (e.g., Beethoven). Will not display if a birth date is entered. Do not use subtemplates. Parameter 'baptized' can be used for articles that use American english spelling.", "label": "Baptised", "aliases": [ "baptized" ], "type": "date" }, "disappeared_date": { "description": "(For missing people) Date of disappearance: Template:disappeared date and age (if birth date is known) or Template:disappeared date (if birth date unknown).", "label": "Disappeared date" }, "disappeared_place": { "description": "(For missing people) Place of disappearance: city, administrative region, sovereign state. Do not use a flag template.", "label": "Disappeared place" }, "disappeared_status": { "description": "(For missing people) Current status for the person, e.g., if the person is still regarded as missing (using Template:missing for to calculate the time since disappearance), or if the person has been declared dead in absentia, with a date for such a ruling.", "label": "Disappeared status", "aliases": [ "status" ] }, "death_date": { "description": "Date of death: {{Death date and age|YYYY|MM|DD|YYYY|MM|DD}} (if birth date is known) or Template:death date (if birth date unknown). See Template:Death date/doc for details on usage. If exact dates are unknown, consider using Template:death year and age.", "label": "Death date" }, "death_place": { "description": "Place of death: city, administrative region, sovereign state. Note: Do not use a flag template. Use the name of the deathplace at the time of death, e.g.: Saigon (prior to 1976), Ho Chi Minh City (post 1976)", "label": "Death place", "type": "string" }, "death_cause": { "description": "Cause of death. This should only be included when the cause of death has significance for the subject's notability.", "label": "Death cause", "aliases": [ "death cause" ] }, "body_discovered": { "description": "Place where the body was discovered (if different from place of death). Do not use a flag template.", "label": "Body discovered", "aliases": [ "body discovered" ] }, "resting_place": { "description": "Place of burial, ash-scattering, etc. Do not use a flag template.", "label": "Resting place", "aliases": [ "resting place", "restingplace" ] }, "resting_place_coordinates": { "description": "Coordinates for place of burial, ash-scattering etc. Use Template:coord template.", "label": "Resting place coordinates", "aliases": [ "resting place coordinates", "restingplacecoordinates" ] }, "monuments": { "description": "Significant monuments erected, buildings named, etc., in honour of the subject. If many, link to an appropriate section of the article instead.", "label": "Monuments" }, "nationality": { "description": "Nationality. May be used instead of citizenship (below) or vice versa in cases where any confusion could result. Should only be used 'with' citizenship when they somehow differ. Should only be used if nationality cannot be inferred from the birthplace per [[WP:INFONAT]]. Do not use a flag template.", "label": "Nationality", "type": "string" }, "other_names": { "description": "Other notable names for the person, if different from name and birth_name.", "label": "Other names", "aliases": [ "other names", "othername", "nickname", "alias" ] }, "siglum": { "description": "Siglum, monogram, shortcut, if relevant.", "label": "Siglum" }, "citizenship": { "description": "Country of legal citizenship, if different from nationality. Rarely needed. See usage notes for nationality above. Should only be used if citizenship cannot be inferred from the birthplace. Do not use a flag template.", "label": "Citizenship", "type": "string" }, "education": { "description": "Education, e.g., degree, institution and graduation year, if relevant. If very little information is available or relevant, the `alma_mater` parameter may be more appropriate.", "label": "Education" }, "alma_mater": { "description": "Alma mater. This parameter is a more concise alternative to `education`, and will most often simply consist of the linked name of the last-attended higher education institution. It is usually not relevant to include either parameter for non-graduates, but article talk page consensus may conclude otherwise, as at Bill Gates.", "label": "Alma mater", "aliases": [ "alma mater" ] }, "occupation": { "description": "Occupation(s) as given in the lead.", "label": "Occupation" }, "years_active": { "description": "Date range in years during which the subject was active in their principal occupation(s) and/or other activity for which they are notable. Use the format 1950–2000, or 1970–present if still active (note the use of an en dash, not hyphen). If no dates of birth and/or death are known for the subject, only a floruit date range, as is common with ancient subjects, this parameter can be used for it. If approximate (circa) dates are known for either or both, put them in the birth_date and death_date parameters.", "label": "Years active", "aliases": [ "years active", "yearsactive" ] }, "era": { "description": "Era during which the subject lived or was active. Less specific than 'years active'.", "label": "Era" }, "employer": { "description": "Employer(s), if relevant.", "label": "Employer" }, "organization": { "description": "Non-employing organization(s), if relevant.", "label": "Organization", "aliases": [ "organizations", "organisation", "organisations" ] }, "agent": { "description": "The subject's agent (individual and/or agency), discouraged in most cases, specifically when promotional, and requiring a reliable source.", "label": "Agent" }, "known_for": { "description": "A brief description of what the person is notable for.", "label": "Known For", "aliases": [ "known for", "known" ], "example": "Environmental activism" }, "notable_works": { "description": "Title(s) of notable work(s) (publications, compositions, sculptures, films, etc.) by the subject, if any.", "label": "Notable works", "aliases": [ "works", "credits", "notable works", "label_name" ] }, "style": { "description": "The style in which the subject works, if applicable.", "label": "Style" }, "net_worth": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "Current estimated net worth, if relevant. Please be sure to support with a citation from a reliable source, in the article body.", "label": "DEPRECATED: Net worth", "aliases": [ "net worth", "networth" ] }, "height": { "description": "If person was notable for their height, or if height is relevant. If used, this should also include the year of the measurement if the person had not reached full adulthood when this stat was published. See documentation of this parameter at Template:Infobox sportsperson for more information.", "label": "Height" }, "height_m": { "description": "If person was notable for their height, or if height is relevant, their height in metres (it will be automatically converted to Imperial).", "label": "Height in metres", "type": "number" }, "height_cm": { "description": "If person was notable for their height, or if height is relevant, their height in centimetres (it will be automatically converted to Imperial).", "label": "Height in centimetres", "type": "number" }, "height_ft": { "description": "If person was notable for their height, or if height is relevant, their height in whole feet (it will be automatically converted to SI). Use with height_in.", "label": "Height in feet", "type": "number" }, "height_in": { "description": "If person was notable for their height, or if height is relevant, their height in remaining inches (it will be automatically converted to SI). Use with height_ft.", "label": "Remaining height in inches", "type": "number" }, "weight": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "label": "DEPRECATED: Weight" }, "weight_kg": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in kilogrammes (it will be automatically converted to Imperial).", "label": "DEPRECATED: Weight in kilogrammes" }, "weight_lb": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in pounds, or their weight in remaining pounds if weight in whole stones is specified (it will be automatically converted to SI).", "label": "DEPRECATED: Weight in pounds" }, "weight_st": { "deprecated": "DEPRECATED: Use of this parameter is discouraged. Delete it when encountered.", "description": "If person was notable for their weight, or if weight is relevant, their weight in whole stones (it will be automatically converted to SI).", "label": "DEPRECATED: Weight in stones" }, "television": { "description": "Television programmes presented by or closely associated with the subject.", "label": "Television" }, "title": { "description": "Multiple uses: Formal title, such as First Lady of Japan for Akie Abe.; Awarded title, such as Mr. Olympia for Arnold Schwarzenegger.; Job title, such as President of Calvin College for Anthony Diekema.; A combination of the above, such as Professor of Mathematics and Fellow of the Royal Society for Bill Parry See also \"awards\" parameter, below, for awarded honors that are not really titles. A single award should not use both parameters.", "label": "Title", "aliases": [ "office" ] }, "term": { "description": "Years the person held the title listed above.", "label": "Term" }, "predecessor": { "description": "Person who previously held the title listed above.", "label": "Predecessor" }, "successor": { "description": "Person who subsequently held the title listed above.", "label": "Successor" }, "party": { "description": "If relevant. Field labelled Political party.", "label": "Party" }, "otherparty": { "description": "If relevant. Field labelled Other political affiliations.", "label": "Other party" }, "movement": { "description": "If relevant. '''Movement''' can be social, political (non-party), artistic, philosophical, literary, cultural, etc.", "label": "Movement" }, "opponents": { "description": "Notable relevant opponents (e.g., for major political office).", "label": "Opponents" }, "boards": { "description": "For board of directors membership(s), if relevant. Field labeled Board member of.", "label": "Boards" }, "criminal_charges": { "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources in the article body.", "label": "Criminal charge(s)", "aliases": [ "criminal_charge", "criminal charge" ] }, "criminal_penalty": { "label": "Criminal penalty", "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body.", "aliases": [ "criminal penalty" ] }, "criminal_status": { "label": "Criminal status", "description": "For convicted criminals only. Please be certain to support these parameters with citations from reliable sources, in the article body.", "aliases": [ "judicial_status", "judicial status", "criminal status" ] }, "spouse": { "description": "Name of spouse(s), followed by years of marriage. Use the format Name (married 1950–present) for a current spouse, and Name (married 1970–1999) for former spouse(s). Separate entries using Template:Plainlist or Template:Unbulleted list. For deceased persons still married at time of death, do not include an end year. {{Marriage}} may be used.", "label": "Spouse(s)", "aliases": [ "spouses", "spouse(s)" ] }, "partner": { "description": "For unmarried life partners in a domestic partnership (of any gender or sexual orientation), not business partners. Use the format Name (1950–present) for current partner and Name (1970–1999) for former partner(s).", "label": "Partner(s)", "aliases": [ "partners", "partner(s)", "domestic_partner", "domesticpartner" ] }, "children": { "description": "Number of children (e.g., 3), or list of independently notable names, in which case, separate entries using Template:Plainlist or Template:Unbulleted list. Names may be preceded by a number to show total children and avoid implying that named children are the only offspring. For privacy reasons, consider omitting the names of children of living persons, unless notable.", "label": "Children" }, "parents": { "description": "Names of parents. Separate entries using Template:Plainlist or Template:Unbulleted list. If subject has only one notable mother and/or father, 'mother' and 'father' parameters may be used instead", "label": "Parent(s)" }, "mother": { "description": "Name of mother; include only if subject has one mother who is independently notable or particularly relevant. Overwritten by 'parents' parameter.", "label": "Mother", "type": "string" }, "father": { "description": "Name of father; include only if subject has one father who is independently notable or particularly relevant. Overwritten by 'parents' parameter.", "label": "Father", "type": "string" }, "relatives": { "description": "Names of siblings or other relatives. Include the relationship in parentheses after the name (sister, uncle, etc). Separate entries using Template:Plainlist or Template:Unbulleted list.", "label": "Relatives", "aliases": [ "relations" ] }, "family": { "description": "Family or house of the individual, if notable.", "label": "Family" }, "callsign": { "description": "Amateur radio call sign, if relevant.", "label": "Callsign" }, "awards": { "description": "Notable awards. If many, link to an appropriate section of the article instead. See also \"title\" parameter, above, for awarded titles. A single award should not use both parameters.", "label": "Awards" }, "honours": { "description": "Honours the individual has been awarded, if notable.", "label": "Honours", "aliases": [ "honors" ] }, "website": { "description": "Official website only. Unofficial websites should be placed under ==External links== in the body of the article. Use {{URL}}. Do not include the www. part unless the server requires it. Use camel case capitalization to make multiword domain names easier to read.", "label": "Website", "aliases": [ "homepage", "URL", "url" ], "type": "content", "example": "{{URL|example.com}}", "suggested": true }, "module": { "description": "Used for embedding other infoboxes into this one.", "label": "Module", "aliases": [ "misc" ] }, "module2": { "description": "Used for embedding other infoboxes into this one.", "label": "Module two", "aliases": [ "misc2" ] }, "module3": { "description": "Used for embedding other infoboxes into this one.", "label": "Module three", "aliases": [ "misc3" ] }, "module4": { "description": "Used for embedding other infoboxes into this one.", "label": "Module four", "aliases": [ "misc4" ] }, "module5": { "description": "Used for embedding other infoboxes into this one.", "label": "Module five", "aliases": [ "misc5" ] }, "module6": { "description": "Used for embedding other infoboxes into this one.", "label": "Module six", "aliases": [ "misc6" ] }, "child": { "label": "DEPRECATED: Use as an embedded infobox", "description": "DEPRECATED: Use this infobox within another one. For experts only.", "example": "yes", "deprecated": true, "aliases": [ "embed" ] }, "signature": { "description": "An image of the person's signature. Please use image name: abc.jpg, xpz.png, 123.gif, etc.", "label": "Signature", "type": "wiki-file-name" }, "signature_type": { "description": "Alter from Signature to, for example, Seal", "label": "Signature type", "type": "string" }, "signature_size": { "description": "Default is 150px. If necessary, a signature can be resized manually as per the \"image_size\" parameter.", "label": "Signature size" }, "signature_alt": { "description": "Alt text for the signature image. For example, for :File:Thomas Jefferson Signature.svg, the alt text might be |signature_alt= Th: Jefferson, spelling out the signature exactly as it appears in the image.", "label": "Signature alt", "aliases": [ "signature alt" ], "type": "string" }, "footnotes": { "description": "Notes about any of the infobox data.", "label": "Footnotes" }, "abovestyle": { "description": "DEPRECATED: A CSS style to use for the individual's name, over-riding the community norm. Only use in exception circumstances.", "label": "DEPRECATED: Name CSS over-ride", "deprecated": true }, "image_upright": { "label": "Image upright", "description": "Scales the image thumbnail from its default size by the given factor. Values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%).", "example": "1.15", "default": "1", "type": "number" }, "landscape": { "label": "Landscape", "description": "Set to yes when using wide, short images. The image height (rather than width) will be limited to 200 pixels.", "type": "boolean" }, "burial_place": { "label": "Burial place", "description": "Place of burial, alternative to 'Resting place' Displays the label 'Burial place'.", "type": "content" }, "burial_coordinates": { "label": "Burial place coordinates", "description": "Coordinates for place of burial, to accompany 'Burial place'. Use {{coord}} template." }, "influences": { "label": "DEPRECATED: Influences", "description": "DEPRECATED and unused in the infobox. Do not use.", "deprecated": "Deprecated. Unused in the infobox. Do not use." }, "influenced": { "label": "DEPRECATED: Influenced", "description": "DEPRECATED and unused in the infobox. Do not use.", "deprecated": "Deprecated. Unused in the infobox. Do not use." }, "home_town": { "aliases": [ "home town" ], "label": "DEPRECATED: home_town", "description": "The place where the person was raised and matured, if different from birth place.", "deprecated": "DEPRECATED and now unused in the infobox. Do not use." }, "nocat_wdimage": { "label": "nocat_wdimage", "description": "Where an infobox has no image but Wikidata has an image name, add an image or |nocat_wdimage=yes to the infobox.", "type": "string" } }, "paramOrder": [ "honorific_prefix", "name", "honorific_suffix", "image", "image_upright", "landscape", "image_size", "alt", "caption", "native_name", "native_name_lang", "pronunciation", "other_names", "siglum", "birth_name", "birth_date", "birth_place", "baptised", "disappeared_date", "disappeared_place", "disappeared_status", "death_date", "death_place", "death_cause", "body_discovered", "resting_place", "resting_place_coordinates", "burial_place", "burial_coordinates", "monuments", "nationality", "citizenship", "education", "alma_mater", "occupation", "years_active", "era", "employer", "organization", "agent", "known_for", "notable_works", "style", "net_worth", "height", "height_m", "height_cm", "height_ft", "height_in", "weight", "weight_kg", "weight_lb", "weight_st", "television", "title", "term", "predecessor", "successor", "party", "otherparty", "movement", "opponents", "boards", "criminal_charges", "criminal_penalty", "criminal_status", "spouse", "partner", "children", "parents", "mother", "father", "relatives", "family", "callsign", "awards", "honours", "website", "module", "module2", "module3", "module4", "module5", "module6", "signature", "signature_type", "signature_size", "signature_alt", "footnotes", "nocat_wdimage", "abovestyle", "child", "influences", "influenced", "home_town" ] } </templatedata> </div> == Tracking categories == * {{clc|Pages using infobox person with unknown parameters}} * {{clc|Pages using infobox person with conflicting parameters}} * {{clc|Pages using infobox person with multiple employers}} * {{clc|Pages using infobox person with multiple organizations}} * {{clc|Pages using infobox person with multiple agents}} * {{clc|Pages using infobox person with multiple credits}} * {{clc|Pages using infobox person with multiple labels}} * {{clc|Pages using infobox person with multiple opponents}} * {{clc|Pages using infobox person with multiple criminal charges}} * {{clc|Pages using infobox person with multiple spouses}} * {{clc|Pages using infobox person with multiple partners}} * {{clc|Pages using infobox person with multiple parents}} * {{clc|Biography template using pronunciation}} * {{clc|Biography with signature}} * {{clc|No local image but image on Wikidata}} – Used by [[Template:Wikidata image]] to track articles where an infobox has no image but [[Wikidata]] has an image name. To exclude articles from this category, add an image or {{para|nocat_wdimage|yes}} to the infobox. == See also == Variations of this template which use [[Wikidata]]: * {{tl|Infobox person/Wikidata}} Dependencies: * {{tl|Br separated entries}} * {{tl|Pluralize from text}} * {{tl|Main other}} * {{tl|Convinfobox}} * {{tl|Infobox person/height}} * {{tl|Count}} * {{tl|Unbulleted list}} * {{tl|If empty}} Alternative templates are listed at [[Wikipedia:WikiProject Biography/Infoboxes|WikiProject Biography/Infoboxes]] and within the [[:Category:People and person infobox templates|people and person infobox templates category]]. <div style="display: none">{{reflist}}</div> {{Film- and television-related infobox templates}} <includeonly> {{Basepage subpage| [[Category:People and person infobox templates| ]] [[Category:Biographical templates usable as a module|Person]] [[Category:Infobox templates with module parameter|Person]] [[Category:Templates that add a tracking category]] }} </includeonly> eb6a7aeb27709b030b473600fc9aa9a59c4d295d Template:Marriage/doc 10 564 1149 1148 2024-03-16T10:47:08Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{esoteric}} {{high-use}} {{Lua|Module:Check for unknown parameters|Module:Parameter validation}} {{Uses Wikidata|P21|P570}} {{Uses TemplateStyles|Template:Marriage/styles.css}} ==Usage== {{TemplateData}} <templatedata>{ "format": "inline", "description": "Intended for use in Infoboxes, specifically {{Infobox person}} and templates calling Infobox person.\n\n{{Marriage}} takes up to three unnamed parameters (name, start date, end date) plus an optional named parameter \"end=\" to provide the reason for the end of the marriage.", "params": { "1": { "label": "Spouse's name", "description": "Name of the person to whom the subject married. May be omitted, typically for remarriages to the same spouse.", "type": "string", "suggested": true }, "2": { "label": "Date married", "description": "Date the marriage began.", "type": "date", "suggested": true }, "3": { "label": "Date ended", "description": "Date the marriage was dissolved or the spouse of the article's subject died.", "type": "date", "required": false }, "end": { "label": "Reason marriage ended", "description": "Reason for marriage's end. Suggested reasons are automatically abbreviated. If the marriage ended due to death of article's subject, do not provide a reason.", "type": "string", "required": false, "aliases": [ "reason" ], "suggestedvalues": [ "died", "divorced", "separated", "annulled" ] } } }</templatedata> ===Examples and usage notes=== {{Infobox person|name={{tl|Infobox person}} |spouse = {{Plainlist| * {{marriage |John Smith |1 January 1895 |December 31, 1905}} * {{marriage |John Doe |1885 |July 27, 1888 |end=d.}} * {{marriage |Jane Doe |2002}} * {{marriage |John Q. Public |2002|2010}} * {{marriage |John Q. Citizen |2002|2010|end=div}} * {{marriage |<!--John Q. Citizen-->|2012}} * {{marriage |John Q. Taxpayer |2002|end=div}} * {{marriage |Joe Blow|<!--unknown-->|2010|end=div}} * {{marriage |Joe Bloggs|<!--unknown-->|2010}} * {{marriage |Joe Sixpack|<!--unknown-->|2010|end=<!--uncertain-->}} * {{marriage |Joe Schmo |end=div}} * {{marriage |Juan Perez |2010|reason=<!--earliest-->}} }} }} Infoboxes already reduce text size to 88%, and [[MOS:FONTSIZE]] sets a lower limit for text size at 85% of the normal page font size, so it is not appropriate to use font size reduction when this template is used in an infobox. The example here is produced by: <syntaxhighlight style="font-size:small;" lang="wikitext"> {{Infobox person |spouse = {{Plainlist| * {{marriage |John Smith |1 January 1895 |December 31, 1905}} * {{marriage |John Doe |1885 |July 27, 1888 |end=d.}} * {{marriage |Jane Doe |2002}} * {{marriage |John Q. Public |2002|2010}} * {{marriage |John Q. Citizen |2002|2010|end=div}} * {{marriage |<!--John Q. Citizen-->|2012}} * {{marriage |John Q. Taxpayer |2002|end=div}} * {{marriage |Joe Blow|<!--unknown-->|2010|end=div}} * {{marriage |Joe Bloggs|<!--unknown-->|2010}} * {{marriage |Joe Sixpack|<!--unknown-->|2010|end=<!--uncertain-->}} * {{marriage |Joe Schmo |end=div}} * {{marriage |Juan Perez |2010|reason=<!--earliest-->}} }} }} </syntaxhighlight> * None of the parameters are required on their own, but if a template is missing all three of start date, end date, and reason, an error message will be displayed. * Use of the first two parameters with {{para|end}} ({{para|reason}}) will cause a line break between the name and the start date. * Use of {{dc|his death}} or {{dc|her death}} for this purpose has been deprecated ([[Template talk:Marriage/Archive 5#Use "(m. 1900)" and do not fill in an end date|see discussion]]). * If the marriage ended with the death of the article's subject, {{insource|"Omission per Template:Marriage instructions"|do {{em|not}} provide a date}}. * For either date parameter, only the year will be displayed; if a full date is provided, it is included via a tooltip; i.e., {{tla|Tooltip}}. {{qnote|Use of the values {{dcr|w}}, {{dcr|w.}}, {{dcr|wid}}, {{dcr|wid.}}, {{dcr|widow}}, or {{dcr|widowed}} is [[Template talk:Marriage/Archive 4#Who is widowed - topic or topic's spouse?|no longer supported]] and will display an error message.}} ==Tracking categories== * {{Category link with count|Marriage template errors}}{{sup|†}} * {{Category link with count|Pages using Marriage with duplicate parameters}} {{sup|‡}} * {{Category link with count|Pages using Marriage with unknown parameters}} {{sup|‡}} * {{Category link with count|Pages using Marriage with deprecated parameters}} {{sup|‡}} {{plainlist| * {{small|{{sup|†}} Populated by template logic; contains invalid/missing dates and unsupported parameters/values.}} * {{small|{{sup|‡}} Populated via [[Module:Parameter_validation|parameter validation]].}} }} <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Text-specific formatting and function templates‎]] [[Category:Marriage templates]] [[Category:Templates that add a tracking category|{{PAGENAME}}]] }}</includeonly> 1fe1e4bcd17bf071656dfe6c5472ae6ba6614e60 Template:Plainlist/styles.css 10 565 1151 1150 2024-03-16T10:47:09Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Module:Shortcut/styles.css 828 566 1153 1152 2024-03-16T10:47:09Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid #aaa; background: #fff; color: inherit; /* support dark mode */ padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid #aaa; margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em 0.4em 1em; line-height: 1.3; margin: 0; } 923cab4b9aa9eba5c8a1e53b9d1e2dd164948578 Template:Hlist/styles.css 10 18 1155 22 2024-03-16T10:47:09Z Motzoid India 2 1 revision imported wikitext text/x-wiki /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Marriage/styles.css 10 567 1157 1156 2024-03-16T10:47:09Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ .marriage-line-margin2px { line-height: 0; margin-bottom: -2px; } .marriage-line-margin3px { line-height: 0; margin-bottom: -3px; } .marriage-display-ws { display: inline; white-space: nowrap; } c7f451088a54f39897051a4421a9d8c5a9a1b23d Motzoid India 0 568 1158 2024-03-16T11:29:10Z Motzoid India 2 Created page with "Motzoid India is an Indian content creator who mainly releases their content on YouTube. It was founded by [[Dhumik Pravin]] in 2021 as an Entertainment YouTube Channel under the name of Motzoid. Later in 2022, it was renamed Motzoid India and established as a media conglomerate YouTube channel. == History == Motzoid was formed after the defunct of the Music YouTube channel named DP Live Music Production founded by Dhumik Pravin in 2021. During their first few months,..." wikitext text/x-wiki Motzoid India is an Indian content creator who mainly releases their content on YouTube. It was founded by [[Dhumik Pravin]] in 2021 as an Entertainment YouTube Channel under the name of Motzoid. Later in 2022, it was renamed Motzoid India and established as a media conglomerate YouTube channel. == History == Motzoid was formed after the defunct of the Music YouTube channel named DP Live Music Production founded by Dhumik Pravin in 2021. During their first few months, they started to create long-form content on YouTube however being a single individual, it was hard for Dhumik to make hours of long-form content. However, YouTube launched its new feature of Shorts in September 2020 which led Dhumik to create short-form videos on his channel. Dhumik started uploading his short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin's wedding and entertainment content. On the main channel, currently, Dhumik has started to upload short-form videos of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand short forms and plans to start new short ideas. == Products == As a content creator, Motzoid has launched various products and services developed by them. * [[Aerialgram]] - A social media application launched on 17 July 2023. * [[Aryavartpedia]] - An Indian free-to-use Encloypedia launched on 19 February 2024. * ff51f81b2524a7abe4784171bcb8cc1ee916b377 1159 1158 2024-03-16T11:30:31Z Motzoid India 2 wikitext text/x-wiki Motzoid India is an Indian content creator who mainly releases their content on YouTube. It was founded by [[Dhumik Pravin]] in 2021 as an Entertainment YouTube Channel under the name of Motzoid. Later in 2022, it was renamed Motzoid India and established as a media conglomerate YouTube channel. == History == Motzoid was formed after the defunct of the Music YouTube channel named DP Live Music Production founded by Dhumik Pravin in 2021. During their first few months, they started to create long-form content on YouTube however being a single individual, it was hard for Dhumik to make hours of long-form content. However, YouTube launched its new feature of Shorts in September 2020 which led Dhumik to create short-form videos on his channel. Dhumik started uploading his short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin's wedding and entertainment content. On the main channel, currently, Dhumik has started to upload short-form videos of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand short forms and plans to start new short ideas. == Products == As a content creator, Motzoid has launched various products and services developed by them. * [[Aerialgram]] - A social media application launched on 17 July 2023. * [[Aryavartpedia]] - An Indian free-to-use Encloypedia launched on 19 February 2024. *[[Motzoid Music]] - an Indian music record label under Motzoid India. 511f039c9d3fd1e52897caf76ab52182bdbb2a2b 1161 1159 2024-03-16T11:31:30Z Motzoid India 2 wikitext text/x-wiki Motzoid India is an Indian content creator who mainly releases their content on YouTube. It was founded by [[Dhumik Pravin]] in 2021 as an Entertainment YouTube Channel under the name of Motzoid. Later in 2022, it was renamed Motzoid India and established as a media conglomerate YouTube channel. == History == Motzoid was formed after the defunct of the Music YouTube channel named DP Live Music Production founded by Dhumik Pravin in 2021. During their first few months, they started to create long-form content on YouTube however being a single individual, it was hard for Dhumik to make hours of long-form content. However, YouTube launched its new feature of Shorts in September 2020 which led Dhumik to create short-form videos on his channel. Dhumik started uploading his short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin's wedding and entertainment content. On the main channel, currently, Dhumik has started to upload short-form videos of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand short forms and plans to start new short ideas. == Products == As a content creator, Motzoid has launched various products and services developed by them. * [[Aerialgram]] - A social media application launched on 17 July 2023. * [[Aryavartpedia]] - An Indian free-to-use Encloypedia launched on 19 February 2024. *[[Motzoid Music]] - an Indian music record label under Motzoid India. [[Category:Motzoid India]] [[Category:YouTube Channels]] 87cde1c031dbad755607791e3bd07bebdfb78104 Dhumik Pravin 0 4 1160 10 2024-03-16T11:30:52Z Motzoid India 2 wikitext text/x-wiki '''Dhumik Pravin''' (18 February 2007), is an [[India|Indian]] [[YouTuber]] and [[music producer]] who is the founder of [[Motzoid India]] which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati [[Hindu]] Family in [[Diu]]. In 2014, Dhumik and his family moved to [[Leicester]], [[UK]] for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. [[Category:Living people]] b6f5f9330d4289b783589b353d38c4778c1a895c 1164 1160 2024-03-16T11:32:18Z Motzoid India 2 wikitext text/x-wiki '''Dhumik Pravin''' (18 February 2007), is an [[India|Indian]] [[YouTuber]] and [[music producer]] who is the founder of [[Motzoid India]] which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati [[Hindu]] Family in [[Diu]]. In 2014, Dhumik and his family moved to [[Leicester]], [[UK]] for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. [[Category:Living people]] [[Category:Motzoid India]] 96ebee44154db0f081c1d984882abc9f7c14890b 1170 1164 2024-03-16T12:03:42Z Motzoid India 2 wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Dhumik Pravin''' |- ! Birth date | February 18, 2007 (age 17) |- ! Place of birth | Diu, India |- ! Organisation founded | Motzoid India |- ! Occupation | Youtuber |} '''Dhumik Pravin''' (18 February 2007), is an [[India|Indian]] [[YouTuber]] and [[music producer]] who is the founder of [[Motzoid India]] which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati [[Hindu]] Family in [[Diu]]. In 2014, Dhumik and his family moved to [[Leicester]], [[UK]] for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. [[Category:Living people]] [[Category:Motzoid India]] 0e60bee8c79c16c306e718bb08395232181da5cb Category:Living people 14 569 1162 2024-03-16T11:31:39Z Motzoid India 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Category:Motzoid India 14 570 1163 2024-03-16T11:31:50Z Motzoid India 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Aryavartpedia 0 25 1165 31 2024-03-16T11:33:23Z Motzoid India 2 wikitext text/x-wiki Aryavartpedia is an Indian encyclopedia website founded by Motzoid India and hosted by Miraheze. It was formed on 19 February 2024. [[Category:Motzoid India]] [[Category:Encyclopedia Websites]] 01236ef3f77c1b8448e701eecce5f7edef2f7269 Category:Encyclopedia Websites 14 571 1166 2024-03-16T11:33:43Z Motzoid India 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Wikipedia 0 572 1167 2024-03-16T11:37:46Z Motzoid India 2 Created page with "Wikipedia is a free online encyclopedia that anyone can read, edit, and contribute to. It's like a giant library on the internet, filled with articles on a wide range of topics. From history and science to art and pop culture, Wikipedia has something for everyone. But how did it all begin, and how did Wikipedia grow into the massive resource it is today? == Early Beginnings == Wikipedia's story starts in January 2001 when two friends, Jimmy Wales and Larry Sanger, had a..." wikitext text/x-wiki Wikipedia is a free online encyclopedia that anyone can read, edit, and contribute to. It's like a giant library on the internet, filled with articles on a wide range of topics. From history and science to art and pop culture, Wikipedia has something for everyone. But how did it all begin, and how did Wikipedia grow into the massive resource it is today? == Early Beginnings == Wikipedia's story starts in January 2001 when two friends, Jimmy Wales and Larry Sanger, had an idea. They wanted to create a website where people from all over the world could share their knowledge and create an online encyclopedia. They called it "Wikipedia," combining the words "wiki" (a Hawaiian term for quick) and "encyclopedia." === The Birth of Wikipedia === Wikipedia officially launched on January 15, 2001. At first, it was a small project with only a few articles written by volunteers. But as word spread, more people joined in, adding new articles and improving existing ones. Unlike traditional encyclopedias, which were written by experts and published in books, Wikipedia was open to everyone. This meant that anyone with an internet connection could contribute, making it a truly collaborative effort. === The Growth Spurt === As Wikipedia grew, so did its content. By the end of its first year, it had over 20,000 articles in English alone. Other languages soon followed suit, with volunteers translating articles and creating new ones in their native languages. This rapid expansion was made possible by the wiki software, which allowed users to easily create, edit, and link pages together. == Challenges and Controversies == While Wikipedia was praised for its openness and accessibility, it also faced challenges. One of the biggest was ensuring the accuracy of its articles. Because anyone could edit them, there was always the risk of vandalism or misinformation. To address this, Wikipedia introduced strict guidelines and policies for editing, as well as a community of volunteer editors who monitored changes and reverted any vandalism. Despite these efforts, Wikipedia still faced criticism from some quarters. Critics argued that its reliance on volunteer contributors made it susceptible to bias and inaccuracies. Others questioned the reliability of its sources and the expertise of its editors. However, studies have shown that Wikipedia's accuracy is comparable to traditional encyclopedias, and its community of editors works tirelessly to maintain its quality. == A Global Resource == Today, Wikipedia is one of the most popular websites on the internet, with millions of articles in hundreds of languages. It has become a go-to resource for students, researchers, and curious minds around the world. From school projects to scholarly research, Wikipedia is often the first stop for people seeking information on a wide range of topics. Wikipedia's journey from a small side project to a global phenomenon is a testament to the power of collaboration and community. By harnessing the collective knowledge of millions of volunteers, Wikipedia has created a free, accessible, and invaluable resource for generations to come. As long as there are people with a thirst for knowledge, Wikipedia will continue to thrive and evolve, fulfilling its mission to share the sum of all human knowledge with the world. df5642930bd65a6a74ba2c87b19d75bfe9fd6007 Template:Infobox person 10 387 1168 781 2024-03-16T11:40:33Z Motzoid India 2 Replaced content with "{{Infobox person | name = | image = | caption = | birth_date = | birth_place = | nationality = | occupation = | years_active = | known_for = | notable_works = | spouse = | children = | website = }}" wikitext text/x-wiki {{Infobox person | name = | image = | caption = | birth_date = | birth_place = | nationality = | occupation = | years_active = | known_for = | notable_works = | spouse = | children = | website = }} ae35d38e029d4c5eefc30787721c9a36f00207f4 Pandurang Shastri Athavale 0 574 1171 2024-03-16T12:10:42Z Motzoid India 2 Created page with "'''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe,..." wikitext text/x-wiki '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 3d34b67a12f67fd5b175ba7614aa63d47d9cc8cc 1172 1171 2024-03-16T12:12:42Z Motzoid India 2 wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 5px; padding: 5px;" |+ '''Pandurang Shastri Athavale''' |- | colspan="2" style="text-align:center;"|[[File:Pandurang Shastri Athavale, (1920-2003).jpg|200px]] |- ! Born | October 19, 1920 |- ! Place of birth | Roha, Maharashtra, India |- ! Died | October 25, 2003 (aged 83) |- ! Occupation | Social reformer, Philosopher, Spiritual leader |- ! Known for | Founding Swadhyaya Parivar, Promoting universal brotherhood and social harmony |} '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 7943dd9a197a359ddeaa013f7fbe35731e44f951 1174 1172 2024-03-16T12:28:03Z Motzoid India 2 wikitext text/x-wiki '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 3d34b67a12f67fd5b175ba7614aa63d47d9cc8cc 1176 1174 2024-03-16T12:37:41Z Motzoid India 2 wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Pandurang Shastri Athavale''' |- ! Birth date | 19 October, 1920 |- ! Death Date | 25 October, 2003 (Aged 83) |- ! Place of birth | Roha, British India |- ! Known For |Swadhyaya Parivar |- ! Spouse | Nirmala Tai Athavale |- ! Children | [[Jayshree Talwalkar]] |} '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 66237dd373068cff6b1384eb4bd4e01824d81a5f File:Pandurang Shastri Athavale, (1920-2003).jpg 6 575 1173 2024-03-16T12:16:29Z Motzoid India 2 wikitext text/x-wiki Pandurang Shastri Athavale, (1920-2003) 1ac333924db83ad1526b7eb7be136ac393025ce9 Main Page 0 1 1175 35 2024-03-16T12:29:30Z Motzoid India 2 wikitext text/x-wiki == ARYAVARTPEDIA == <div id="articlecount">[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles in [[English language|English]]</div> {{Main Page/Introduction}}{{Main Page/topics}} f1bd9da803c0b438bfc54fb499c79c6c9397c3d0 Jayshree Talwalkar 0 576 1177 2024-03-16T12:38:26Z Motzoid India 2 Created page with "Jayshree Talwalkar, also known as Didiji, which literally translates as elder sister in Hindi, is an Indian philosopher, spiritual leader, social reformer.She has represented Swadhyay and Indian philosophy at different conferences. Jayshree Talwalkar is the daughter and spiritual heir of [[Pandurang Shastri Athavale]] (Dadaji), a philosopher, social scientist, and founder of the Swadhyay (pronounced ‘swaadhyaay’) Parivar (meaning family). She is the leader of “Sil..." wikitext text/x-wiki Jayshree Talwalkar, also known as Didiji, which literally translates as elder sister in Hindi, is an Indian philosopher, spiritual leader, social reformer.She has represented Swadhyay and Indian philosophy at different conferences. Jayshree Talwalkar is the daughter and spiritual heir of [[Pandurang Shastri Athavale]] (Dadaji), a philosopher, social scientist, and founder of the Swadhyay (pronounced ‘swaadhyaay’) Parivar (meaning family). She is the leader of “Silent but Singing” Swadhyay movement. At the age of 20, she conducted the first “Geetatrayah” – a three-day overview of Bhagvad Geeta - reciting, translating and explaining applied philosophy of "Bhagvad Geeta - Divine Song of the Lord Krishna". Since then, she has conducted numerous Geetatrayah. She was awarded the Lokshikshak Award by Apte Guruji Smarak Trust. In 2002, she spoke at a symposium organized by the New York-based World Conference on Religion and Peace (WCRP), and was the only invitee to represent Hinduism to speak at the World Conference on Peace, organized by Pontifical Council for Inter-Religious Dialogue f80b1117754a091b7eeca8beaa3f1dbffb0700bf History of science and technology on the Indian subcontinent 0 577 1179 1178 2024-03-16T12:41:13Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Short description|Overview of science and technology developed on the Indian subcontinent}} {{About|scientific and technological developments in ancient India|the modern-day Republic of India|Science and technology in India|modern-day Pakistan|Science and technology in Pakistan}} {{HistoryOfSouthAsia}} {{Science and technology in India}} The '''history of science and technology on the Indian subcontinent''' begins with the [[History of India#Prehistoric era (until c. 3300 BCE)|prehistoric human activity]] of the [[Indus Valley Civilisation]] to the early Indian states and empires.<ref>{{Cite web |url=http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |title=Distribution of Acheulian sites in the Siwalik region |access-date=2015-11-16 |archive-url=https://web.archive.org/web/20120104171240/http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |archive-date=2012-01-04 |url-status=dead }}</ref> ==Prehistory== {{See also|List of Indian inventions and discoveries}} [[File:Hand-propelled wheel cart from Indus Valley Civilization.GIF|thumb|Hand-propelled wheel cart, Indus Valley Civilization (3300–1300 BCE). Housed at the [[National Museum, New Delhi]].]] By 5500 BCE a number of sites similar to [[Mehrgarh]] (modern-day [[Pakistan]]) had appeared, forming the basis of later chalcolithic cultures.<ref name=Kenoyer230/> The inhabitants of these sites maintained trading relations with [[Central Asia]] and the [[Near East]].<ref name=Kenoyer230>Kenoyer, 230</ref> Irrigation was developed in the Indus Valley Civilization by around 4500 BCE.<ref name=R&U/> The size and prosperity of the Indus civilization grew as a result of this innovation, which eventually led to more planned settlements making use of [[drainage]] and [[sewerage]].<ref name=R&U>Rodda & Ubertini, 279</ref> Sophisticated irrigation and water storage systems were developed by the Indus Valley Civilization, including artificial [[reservoir]]s at [[Girnar]] dated to 3000 BCE, and an early [[canal]] irrigation system from c. 2600 BCE.<ref>Rodda & Ubertini, 161</ref> [[Cotton]] was cultivated in the region by the 5th–4th millennia BCE.<ref>Stein, 47</ref> [[Sugarcane]] was originally from tropical South and Southeast Asia.<ref name=Sharpe/> Different species likely originated in different locations with ''S. barberi'' originating in India, and ''S. edule'' and ''S. officinarum'' coming from [[New Guinea]].<ref name=Sharpe>Sharpe (1998)</ref> The inhabitants of the Indus valley developed a system of [[standardization]], using weights and measures, evident by the excavations made at the Indus valley sites.<ref name=Baber_b>Baber, 23</ref> This [[technical standard]]ization enabled gauging devices to be effectively used in [[angular measurement]] and measurement for construction.<ref name=Baber_b/> [[Calibration]] was also found in measuring devices along with multiple subdivisions in case of some devices.<ref name=Baber_b/> One of the earliest known [[Dock (maritime)|dock]]s is at [[Lothal]] (2400 BCE), located away from the main current to avoid deposition of silt.<ref name="RaoQ"/> Modern oceanographers have observed that the [[Indus Valley Civilisation#Early Harappan|Harappans]] must have possessed knowledge relating to tides in order to build such a dock on the ever-shifting course of the [[Sabarmati]], as well as exemplary [[hydrography]] and maritime engineering.<ref name="RaoQ">Rao, 27–28</ref> Excavations at [[Balakot]] ([[Kot Bala]]) (c. 2500–1900 BCE), modern day Pakistan, have yielded evidence of an early [[Metallurgical furnace|furnace]].<ref name=Dales/> The furnace was most likely used for the manufacturing of [[ceramic]] objects.<ref name=Dales>Dales, 3–22 [10]</ref> [[Oven]]s, dating back to the civilization's mature phase (c. 2500–1900 BCE), were also excavated at Balakot.<ref name=Dales/> The [[Kalibangan]] archeological site further yields evidence of potshaped [[hearth]]s, which at one site have been found both on ground and underground.<ref name=Baber20>Baber, 20</ref> [[Kiln]]s with fire and kiln chambers have also been found at the Kalibangan site.<ref name=Baber20/> [[File:Ashoka pillar at Vaishali, Bihar, India.jpg|thumb|left|View of the Ashokan Pillar at [[Vaishali (ancient city)|Vaishali]]. One of the [[edicts of Ashoka]] (272–231 BCE) reads: "Everywhere King Piyadasi (Ashoka) erected two kinds of hospitals, hospitals for people and hospitals for animals. Where there were no healing herbs for people and animals, he ordered that they be bought and planted."<ref name=finger12>Finger, 12</ref>]] Based on archaeological and textual evidence, [[Joseph E. Schwartzberg]] (2008)—a [[University of Minnesota]] [[professor emeritus]] of geography—traces the origins of [[Indian cartography]] to the Indus Valley Civilization (c. 2500–1900 BCE).<ref name=Schwartzberg1/> The use of large scale constructional plans, cosmological drawings, and cartographic material was known in [[South Asia]] with some regularity since the [[Vedic period]] (2nd – 1st millennium BCE).<ref name=Schwartzberg1>"We now believe that some form of mapping was practiced in what is now India as early as the Mesolithic period, that surveying dates as far back as the Indus Civilization (ca. 2500–1900 BCE), and that the construction of large-scale plans, cosmographic maps, and other cartographic works has occurred continuously at least since the late Vedic age (first millennium BCE)" — Joseph E. Schwartzberg, 1301.</ref> Climatic conditions were responsible for the destruction of most of the evidence, however, a number of excavated surveying instruments and measuring rods have yielded convincing evidence of early cartographic activity.<ref name=Schwartzberg1301-1302>Schwartzberg, 1301–1302</ref> Schwartzberg (2008)—on the subject of surviving maps—further holds that: 'Though not numerous, a number of map-like graffiti appear among the thousands of Stone Age Indian cave paintings; and at least one complex Mesolithic diagram is believed to be a representation of the cosmos.'<ref name=Schwartzberg1301>Schwartzberg, 1301</ref> Archeological evidence of an animal-drawn [[plough]] dates back to 2500 BCE in the Indus Valley Civilization.<ref name=lal>Lal (2001)</ref> The earliest available [[sword]]s of copper discovered from the Harappan sites date back to 2300 BCE.<ref name=allchin1/> Swords have been recovered in archaeological findings throughout the [[Ganges]]–[[Jaunpur, Uttar Pradesh|Jamuna]] [[Doab]] region of India, consisting of [[bronze]] but more commonly copper.<ref name=allchin1>Allchin, 111–112</ref> ==Early kingdoms== [[File:Ganesha ink.jpg|thumb|Ink drawing of Ganesha under an umbrella (early 19th century). [[India ink|Carbon pigment]] [[Ink]], called ''masi'', and popularly known as [[India ink]] was an admixture of several chemical components, has been used in India since at least the 4th century BCE.<ref>Banerji, 673</ref> The practice of writing with ink and a sharp pointed needle was common in early [[South India]].<ref>Sircar, 62</ref> Several [[Jain]] sutras in India were compiled in [[India ink|Carbon pigment]] [[Ink]].<ref>Sircar, 67</ref> ]] [[File:Hindu-arabic1.jpg|thumb|The ''Hindu-Arabic numeral'' system. The inscriptions on the edicts of Ashoka (1st millennium BCE) display this number system being used by the Imperial Mauryas.]] The religious texts of the [[Vedic period]] provide evidence for the use of [[History of large numbers|large numbers]].<ref name=hayashi2005-p360-361/> By the time of the last Veda, the ''[[Yajurveda|{{IAST|Yajurvedasaṃhitā}}]]'' (1200–900 BCE), numbers as high as <math>10^{12}</math> were being included in the texts.<ref name=hayashi2005-p360-361>Hayashi, 360–361</ref> For example, the ''[[mantra]]'' (sacrificial formula) at the end of the ''annahoma'' ("food-oblation rite") performed during the ''[[Ashvamedha|aśvamedha]]'' ("an allegory for a horse sacrifice"), and uttered just before-, during-, and just after sunrise, invokes powers of ten from a hundred to a trillion.<ref name=hayashi2005-p360-361/> The [[Shatapatha Brahmana]] (9th century BCE) contains rules for ritual geometric constructions that are similar to the Sulba Sutras.<ref>Seidenberg, 301–342</ref> [[Baudhayana]] (c. 8th century BCE) composed the ''Baudhayana Sulba Sutra'', which contains examples of simple [[Pythagorean triple]]s,<ref>{{citation |first=Meera |last=Nanda |title=Hindutva's science envy |url=http://www.frontline.in/science-and-technology/hindutvas-science-envy/article9049883.ece |newspaper=Frontline |date=16 September 2016 |access-date=14 October 2016}}</ref> such as: <math>(3, 4, 5)</math>, <math>(5, 12, 13)</math>, <math>(8, 15, 17)</math>, <math> (7, 24, 25)</math>, and <math>(12, 35, 37)</math><ref name=joseph229>Joseph, 229</ref> as well as a statement of the [[Pythagorean theorem]] for the sides of a square: "The rope which is stretched across the diagonal of a square produces an area double the size of the original square."<ref name=joseph229/> It also contains the general statement of the Pythagorean theorem (for the sides of a rectangle): "The rope stretched along the length of the diagonal of a rectangle makes an area which the vertical and horizontal sides make together."<ref name=joseph229/> Baudhayana gives a formula for the [[square root of two]].<ref name=cooke200>Cooke, 200</ref> Mesopotamian influence at this stage is considered likely.<ref name="Boyer 1991 loc=China and India p. 207">{{Harv|Boyer|1991|loc="China and India" p. 207}}</ref> The earliest [[Indian astronomy|Indian astronomical]] text—named ''[[Vedanga Jyotisha|{{IAST|Vedānga Jyotiṣa}}]]'' and attributed to ''Lagadha''—is considered one of the oldest astronomical texts, dating from 1400 to 1200 BCE (with the extant form possibly from 700 to 600 BCE),<ref name=Cosmic>{{cite book|last=Subbarayappa|first=B. V.|editor=Biswas, S. K. |editor2=Mallik, D. C. V. |editor3=Vishveshwara, C. V. |editor3-link=C. V. Vishveshwara |title=Cosmic Perspectives|chapter-url=https://books.google.com/books?id=PFTGKi8fjvoC&pg=FA25|date=14 September 1989|publisher=Cambridge University Press|isbn=978-0-521-34354-1|pages=25–40|chapter=Indian astronomy: An historical perspective}}</ref> it details several astronomical attributes generally applied for timing social and religious events. It also details astronomical calculations, calendrical studies, and establishes rules for empirical observation.<ref name= Subbaarayappa>Subbaarayappa, 25–41</ref> Since the ''{{IAST|Vedānga Jyotiṣa}}'' is a religious text, it has connections with [[hindu astrology]] and details several important aspects of the time and seasons, including lunar months, solar months, and their adjustment by a lunar leap month of ''Adhikamāsa''.<ref name=Tripathi08>Tripathi, 264–267</ref> ''[[Ritu (Indian season)|Ritus]]'' and ''[[Yuga]]s'' are also described.<ref name=Tripathi08/> Tripathi (2008) holds that "Twenty-seven constellations, eclipses, seven planets, and twelve signs of the zodiac were also known at that time."<ref name=Tripathi08/> The [[Egypt]]ian ''Papyrus of Kahun'' (1900 BCE) and literature of the [[Vedic period]] in India offer early records of [[veterinary medicine]].<ref>Thrusfield, 2</ref> Kearns & Nash (2008) state that mention of [[leprosy]] is described in the medical treatise ''[[Sushruta Samhita]]'' (6th century BCE). The [[Sushruta Samhita]] an [[Ayurvedic]] text contains 184 chapters and description of 1120 illnesses, 700 medicinal plants, a detailed study on Anatomy, 64 preparations from mineral sources and 57 preparations based on animal sources.<ref name=Dwivedi&Dwivedi07 /><ref name=k&n08>Kearns & Nash (2008)</ref> However, ''The Oxford Illustrated Companion to Medicine'' holds that the mention of leprosy, as well as ritualistic cures for it, were described in the Hindu religious book ''[[Atharvaveda]]'', written in 1500–1200 BCE.<ref>Lock etc., 420</ref> [[Cataract surgery]] was known to the physician [[Sushruta]] (6th century BCE).<ref name=finger66>Finger, 66</ref> Traditional cataract surgery was performed with a special tool called the ''Jabamukhi Salaka'', a curved needle used to loosen the lens and push the cataract out of the field of vision.<ref name=finger66/> The eye would later be soaked with warm butter and then bandaged.<ref name=finger66/> Though this method was successful, Susruta cautioned that it should only be used when necessary.<ref name=finger66/> The removal of cataract by surgery was also introduced into China from India.<ref>Lade & Svoboda, 85</ref> Sushruta's treatise provides the first written record of a cheek flap rhinoplasty, a technique still used today to reconstruct a nose.{{citation needed|date=November 2023}}<!-- Empty reference <ref name="Wujastyk 2023"/--> The text mentions more than 15 methods to repair it. These include using a flap of skin from the cheek, which is akin to the most modern technique today.<ref>{{Cite web|title=An English Translation of the Sushruta Samhita, Based on Original Sanskrit Text. Edited and Published by Kaviraj Kunja Lal Bhishagratna. With a Full ... Notes, Comperative Views, Index, Glossary An (Book)|url=https://www.worldhistory.org/books/1296562271/|access-date=2021-05-15|website=www.worldhistory.org|date=8 August 2015 |publisher=Andesite Press |isbn=9781296562274 |language=en}}</ref><ref>{{Cite web|title=Sushruta Samhita: The Ancient Treatise on Surgery|url=https://www.livehistoryindia.com/story/snapshort-histories/sushruta-samhita-the-ancient-treatise-on-surgery/|access-date=2021-05-15|website=Live History India|date=27 November 2017 |language=en-US}}</ref>''Otoplasty''' (surgery of the ear) was developed in [[History of India|ancient India]] and is described in the medical compendium, the {{transl|sa|[[Sushruta Samhita]]}} (Sushruta's Compendium, {{circa|500 AD}}).the first description of a surgical procedure to treat stones was described in the [[Sushruta Samhita]] by [[Sushruta]] around 600 BC.<ref name=":0" /> Two types of diabetes were identified as separate conditions for the first time by the Indian physicians [[Sushruta]] and [[Charaka]] in 400–500&nbsp;CE with one type being associated with youth and another type with being overweight.<ref name=History2010/> Effective treatment was not developed until the early part of the 20th century when Canadians [[Frederick Banting]] and [[Charles Best (medical scientist)|Charles Best]] isolated and purified insulin in 1921 and 1922.<ref name=History2010/> This was followed by the development of the long-acting insulin [[NPH insulin|NPH]] in the 1940s.<ref name=History2010/> The condition was named "hritshoola" in ancient India and was described by [[Sushruta]] (6th century BC).<ref name="Dwivedi&Dwivedi07">{{cite journal| vauthors = Dwivedi G, Dwivedi S |year=2007 |url=http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |title=Sushruta – the Clinician – Teacher par Excellence |journal=The Indian Journal of Chest Diseases and Allied Sciences |volume=49 |pages=243–4 |url-status = dead|archive-url=https://web.archive.org/web/20081010045900/http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |archive-date=2008-10-10}}</ref> [[Angina Pectoris]] During the 5th century BCE, the scholar [[Pāṇini]] had made several discoveries in the fields of [[phonetics]], [[phonology]], and [[morphology (linguistics)|morphology]].<ref name=Ivic>Encyclopædia Britannica (2008), ''Linguistics''.</ref> [[Pāṇini]]'s morphological analysis remained more advanced than any equivalent Western theory until the mid-20th century.<ref>{{cite book | last1 = Staal | first1 = Frits | title = Universals: studies in Indian logic and linguistics | url = https://archive.org/details/universalsstudie00staa | url-access = limited | publisher = University of Chicago Press | year = 1988 | pages = [https://archive.org/details/universalsstudie00staa/page/n57 47] }}</ref> [[Metal]] [[currency]] was minted in India before the 5th century BCE,<ref name=Dhavalikar>Dhavalikar, 330–338</ref><ref name=sellwood2008>Sellwood (2008)</ref> with coinage (400 BCE–100 CE) being made of [[silver]] and copper, bearing animal and plant symbols on them.<ref name=EBAllan&Stern>Allan & Stern (2008)</ref> [[Zinc]] mines of Zawar, near [[Udaipur]], [[Rajasthan]], were active during 400 BCE.<ref name=Craddock>Craddock (1983)</ref><ref>[[Arun Kumar Biswas]], "The primacy of India in ancient brass and zinc metallurgy", Indian J History of Science, 28(4) (1993) page 309–330; and "Brass and zinc metallurgy in the ancient and medieval world: India's primacy and the technology transfer to the west", Indian J History of Science, 41(2) (2006) 159–174</ref> Diverse specimens of swords have been discovered in [[Fatehgarh]], where there are several varieties of hilt.<ref>F.R. Allchin, 111–112</ref> These swords have been variously dated to periods between 1700 and 1400 BCE, but were probably used more extensively during the opening centuries of the 1st millennium BCE.<ref name=Allchin114>Allchin, 114</ref> Archaeological sites in such as Malhar, Dadupur, Raja Nala Ka Tila and Lahuradewa in present-day [[Uttar Pradesh]] show iron implements from the period between 1800 BCE and 1200 BCE.<ref name=Tewari>Tewari (2003)</ref> Early iron objects found in India can be dated to 1400 BCE by employing the method of radio carbon dating.<ref name=Ceccarelli>Ceccarelli, 218</ref> Some scholars believe that by the early 13th century BCE iron smelting was practiced on a bigger scale in India, suggesting that the date of the technology's inception may be placed earlier.<ref name=Tewari/> In [[Southern India]] (present day [[Mysore]]) iron appeared as early as 11th to 12th centuries BCE.<ref name=UCP/> These developments were too early for any significant close contact with the northwest of the country.<ref name=UCP>Drakonoff, 372</ref> ==Middle Kingdoms (230 BCE – 1206 CE)== [[File:QtubIronPillar.JPG|thumb|The [[iron pillar of Delhi]] (375–413 CE). The first iron pillar was the Iron pillar of Delhi, erected at the times of Chandragupta II Vikramaditya.]] The ''[[Arthashastra]]'' of [[Kautilya]] mentions the construction of dams and bridges.<ref>Dikshitar, pg. 332</ref> The use of [[suspension bridge]]s using plaited bamboo and iron chain was visible by about the 4th century.<ref>Encyclopædia Britannica (2008), ''suspension bridge''.</ref> The ''[[stupa]]'', the precursor of the [[pagoda]] and [[torii]], was constructed by the 3rd century BCE.<ref name=Ency>Encyclopædia Britannica (2008), ''Pagoda''.</ref><ref name=Jaanus>[http://www.aisf.or.jp/~jaanus/ Japanese Architecture and Art Net Users System (2001), ''torii''.]</ref> Rock-cut [[step well]]s in the region date from 200 to 400 CE.<ref name=L&B/> Subsequently, the construction of wells at Dhank (550–625 CE) and stepped ponds at [[Bhinmal]] (850–950 CE) took place.<ref name=L&B>Livingston & Beach, xxiii</ref> During the 1st millennium BCE, the [[Vaisheshika]] school of [[atomism]] was founded. The most important proponent of this school was [[Kanada (philosopher)|Kanada]], an [[Indian philosophy|Indian philosopher]].<ref>Oliver Leaman, ''Key Concepts in Eastern Philosophy.'' Routledge, 1999, page 269.</ref> The school proposed that [[atom]]s are indivisible and eternal, can neither be created nor destroyed,<ref>{{harvnb|Chattopadhyaya|1986|pp=169–70}}</ref> and that each one possesses its own distinct {{IAST |viśeṣa}} (individuality).<ref>{{harvnb|Choudhury|2006|p=202}}</ref> It was further elaborated on by the [[Buddhist atomism|Buddhist school of atomism]], of which the philosophers [[Dharmakirti]] and [[Dignāga]] in the 7th century CE were the most important proponents. They considered atoms to be point-sized, durationless, and made of energy.<ref>(Stcherbatsky 1962 (1930). Vol. 1. P. 19)</ref> By the beginning of the [[Common Era]] glass was being used for ornaments and casing in the region.<ref name=Ghosh/> Contact with the [[Greco-Roman world]] added newer techniques, and local artisans learnt methods of glass molding, decorating and coloring by the early centuries of the Common Era.<ref name=Ghosh>Ghosh, 219</ref> The [[Satavahana]] period further reveals short cylinders of composite glass, including those displaying a lemon yellow matrix covered with green glass.<ref name=Ghosh2>"Ornaments, Gems etc." (Ch. 10) in Ghosh 1990.</ref> [[Wootz]] originated in the region before the beginning of the common era.<ref>Srinivasan & Ranganathan</ref> Wootz was exported and traded throughout Europe, China, the Arab world, and became particularly famous in the Middle East, where it became known as [[Damascus steel]]. Archaeological evidence suggests that manufacturing process for Wootz was also in existence in South India before the Christian era.<ref name=Srinivasan94>Srinivasan (1994)</ref><ref>Srinivasan & Griffiths</ref> Evidence for using bow-instruments for [[carding]] comes from India (2nd century CE).<ref name=Baber57>Baber, 57</ref> The mining of [[Diamond (gemstone)|diamonds]] and its early use as gemstones originated in India.<ref name=Wenk1>Wenk, 535–539</ref> [[Golconda]] served as an important early center for diamond mining and processing.<ref name=Wenk1/> Diamonds were then exported to other parts of the world.<ref name=Wenk1/> Early reference to diamonds comes from Sanskrit texts.<ref name=Encarta11>MSN Encarta (2007), [http://encarta.msn.com/encyclopedia_761557986/Diamond.html ''Diamond'']. [https://web.archive.org/web/20091028121034/http://encarta.msn.com/encyclopedia_761557986/Diamond.html Archived] 2009-10-31.</ref> The ''Arthashastra'' also mentions diamond trade in the region.<ref name=lee1>Lee, 685</ref> The [[Iron pillar of Delhi]] was erected at the times of [[Chandragupta II]] Vikramaditya (375–413), which stood without rusting for around 2 millennium.<ref>Balasubramaniam, R., 2002</ref> The [[Rasaratna Samuchaya]] (800) explains the existence of two types of ores for zinc metal, one of which is ideal for metal extraction while the other is used for medicinal purpose.<ref name=Craddock2>Craddock, 13</ref> In the 2nd century, the [[Buddhist philosophy|Buddhist]] philosopher [[Nagarjuna]] refined the ''Catuskoti'' form of logic. The Catuskoti is also often glossed ''[[Tetralemma]]'' (Greek) which is the name for a largely comparable, but not equatable, 'four corner argument' within the tradition of [[Classical logic]]. The origins of the [[spinning wheel]] are unclear but [[South Asia]] is one of the probable places of its origin.<ref>Britannica Concise Encyclopedia (2007), ''spinning wheel''.</ref><ref>Encyclopeedia Britnnica (2008). ''spinning''.</ref> The device certainly reached Europe from India by the 14th century.<ref>MSN Encarta (2008), [http://encarta.msn.com ''Spinning'']. 2009-10-31.</ref> The cotton gin was invented in [[South Asia]] as a mechanical device known as ''charkhi'', the "wooden-worm-worked roller".<ref name="Baber57">Baber, 57</ref> This mechanical device was, in some parts of the region, driven by water power.<ref name="Baber57"/> The [[Ajanta Caves]] yield evidence of a single roller [[cotton gin]] in use by the 5th century.<ref name=Babergin>Baber, 56</ref> This cotton gin was used until further innovations were made in form of foot powered gins.<ref name=Babergin/> Chinese documents confirm at least two missions to India, initiated in 647, for obtaining technology for sugar-refining.<ref name=Kieschnick11>Kieschnick, 258</ref> Each mission returned with different results on refining sugar.<ref name=Kieschnick11/> [[Pingala]] (300–200 BCE) was a [[musical theory|musical theorist]] who authored a [[Sanskrit]] treatise on [[Prosody (music)|prosody]]. There is evidence that in his work on the enumeration of syllabic combinations, Pingala stumbled upon both the [[Pascal triangle]] and [[Binomial coefficients]], although he did not have knowledge of the [[Binomial theorem]] itself.<ref name=fowler96>Fowler, 11</ref><ref name=singh36>Singh, 623–624</ref> A description of [[binary numbers]] is also found in the works of Pingala.<ref>Sanchez & Canton, 37</ref> The Indians also developed the use of the law of signs in multiplication. Negative numbers and the subtrahend had been used in [[East Asia]] since the 2nd century BCE, and [[South Asian]] mathematicians were aware of negative numbers by the 7th century CE,<ref name=Smith>Smith (1958), page 258</ref> and their role in mathematical problems of debt was understood.<ref name=bourbaki49>Bourbaki (1998), page 49</ref> Although the Indians were not the first to use the subtrahend, they were the first to establish the "law of signs" with regards to the multiplication of positive and negative numbers, which did not appear in East Asian texts until 1299.<ref name=Smith2>Smith (1958), page 257–258</ref> Mostly consistent and correct rules for working with negative numbers were formulated,<ref name=bourbaki46>{{Harvnb|Bourbaki|1998|p=46}}</ref> and the diffusion of these rules led the Arab intermediaries to pass it on to Europe.<ref name=bourbaki49/> A [[decimal|decimal number system]] using hieroglyphics dates back to 3000 BC in [[Egypt]],<ref>Georges Ifrah: ''From One to Zero. A Universal History of Numbers'', Penguin Books, 1988, {{ISBN|0-14-009919-0}}, pp. 200–213 (Egyptian Numerals)</ref> and was later in use in ancient India.<ref name=irfah346>Ifrah, 346</ref> By the 9th century CE, the [[Hindu–Arabic numeral system]] was transmitted from the Middle East and to the rest of the world.<ref name="Wigelsworth">{{cite book|author=Jeffrey Wigelsworth|title=Science And Technology in Medieval European Life|url=https://books.google.com/books?id=VPDqnGGHpHYC&pg=PA18|date=1 January 2006|publisher=Greenwood Publishing Group|isbn=978-0-313-33754-3|page=18}}</ref> The concept of [[zero|0]] as a number, and not merely a symbol for separation is attributed to India.<ref name=bourbaki46_2>Bourbaki, 46</ref> In India, practical calculations were carried out using zero, which was treated like any other number by the 9th century CE, even in case of division.<ref name=bourbaki46/><ref name=ebcal>Britannica Concise Encyclopedia (2007). ''algebra''</ref> [[Brahmagupta]] (598–668) was able to find (integral) solutions of [[Pell's equation]]<ref name=sw101>Stillwell, 72–73</ref> and first described [[gravity]] as an attractive force, and used the term "gurutvākarṣaṇam (गुरुत्वाकर्षणम्)]" in Sanskrit to describe it.<ref name="Oxford">{{cite book|last=Pickover|first=Clifford|url=https://books.google.com/books?id=SQXcpvjcJBUC&pg=PA105|title=Archimedes to Hawking: Laws of Science and the Great Minds Behind Them|date=2008|publisher=Oxford University Press|isbn=978-0-19-979268-9|page=105}}</ref> Conceptual design for a [[perpetual motion machine]] by [[Bhāskara II|Bhaskara II]] dates to 1150. He described a wheel that he claimed would run forever.<ref>Lynn Townsend White, Jr.</ref> The [[Trigonometry|trigonometric]] functions of [[sine]] and [[versine]], from which it was trivial to derive the cosine, were used by the mathematician, [[Aryabhata]], in the late 5th century.<ref>O'Connor, J. J. & Robertson, E.F. (1996)</ref><ref>"Geometry, and its branch trigonometry, was the mathematics Indian astronomers used most frequently. In fact, the Indian astronomers in the third or fourth century, using a pre-Ptolemaic Greek table of chords, produced tables of sines and versines, from which it was trivial to derive cosines. This new system of trigonometry, produced in India, was transmitted to the Arabs in the late eighth century and by them, in an expanded form, to the Latin West and the Byzantine East in the twelfth century" – Pingree (2003).</ref> The [[calculus]] theorem now known as "[[Rolle's theorem]]" was stated by mathematician, [[Bhāskara II]], in the 12th century.<ref>Broadbent, 307–308</ref> [[File:The Defeat of Baz Bahadur of Malwa by the Mughal Troops, 1561, Akbarnama.jpg|thumb|[[Akbarnama]]—written by August 12, 1602—depicts the defeat of [[Baz Bahadur]] of [[Malwa]] by the [[Mughal Empire|Mughal]] troops, 1561. The Mughals extensively improved metal weapons and armor used by the armies of India.]] [[Indigo dye|Indigo]] was used as a dye in [[South Asia]], which was also a major center for its production and processing.<ref name=k&c>Kriger & Connah, 120</ref> The ''Indigofera tinctoria'' variety of Indigo was domesticated in India.<ref name=k&c/> Indigo, used as a dye, made its way to the [[ancient Greece|Greeks]] and the [[Ancient Rome|Romans]] via various trade routes, and was valued as a luxury product.<ref name=k&c/> The [[cashmere wool]] fiber, also known as ''pashm'' or ''pashmina'', was used in the handmade shawls of Kashmir.<ref>Encyclopædia Britannica (2008), ''cashmere''.</ref> The woolen shawls from [[Kashmir]] region find written mention between 3rd century BCE and the 11th century CE.<ref name=ebpasm>Encyclopædia Britannica (2008), ''Kashmir shawl''.</ref> Crystallized sugar was discovered by the time of the [[Gupta Empire]],<ref name=Adas>Shaffer, 311</ref> and the earliest reference to candied sugar comes from India.<ref name=Kieschnick1>Kieschnick (2003)</ref> [[Jute]] was also cultivated in India.<ref name=ebjute>Encyclopædia Britannica (2008), ''jute''.</ref> [[Muslin]] was named after the city where Europeans first encountered it, [[Mosul]], in what is now [[Iraq]], but the fabric actually originated from [[Dhaka]] in what is now [[Bangladesh]].<ref>{{cite book |last=Karim |first=Abdul |year=2012 |chapter=Muslin |chapter-url=http://en.banglapedia.org/index.php?title=Muslin |editor1-last=Islam |editor1-first=Sirajul |editor1-link=Sirajul Islam |editor2-last=Jamal |editor2-first=Ahmed A. |title=Banglapedia: National Encyclopedia of Bangladesh |edition=Second |publisher=[[Asiatic Society of Bangladesh]]}}</ref><ref name=Muslin>Ahmad, 5–26</ref> In the 9th century, an [[Islamic economics in the world|Arab merchant]] named Sulaiman makes note of the material's origin in [[Bengal]] (known as ''Ruhml'' in [[Arabic language|Arabic]]).<ref name=Muslin/> European scholar Francesco Lorenzo Pullè reproduced a number of Indian maps in his magnum opus ''La Cartografia Antica dell India''.<ref name=Sircar2>Sircar 328</ref> Out of these maps, two have been reproduced using a manuscript of ''Lokaprakasa'', originally compiled by the polymath Ksemendra ([[Kashmir]], 11th century CE), as a source.<ref name=Sircar2/> The other manuscript, used as a source by Francesco I, is titled ''Samgraha''.<ref name=Sircar2/> ''[[Samarangana Sutradhara]]'', a [[Sanskrit]] treatise by [[Bhoja]] (11th century), includes a chapter about the construction of mechanical contrivances ([[automata]]), including mechanical bees and birds, fountains shaped like humans and animals, and male and female dolls that refilled oil lamps, danced, played instruments, and re-enacted scenes from Hindu mythology.<ref>{{cite book|last=Varadpande|first=Manohar Laxman|year=1987|title=History of Indian Theatre, Volume 1|page=68|publisher=Abhinav Publications |isbn=9788170172215|url=https://books.google.com/books?id=SyxOHOCVcVkC&pg=PA68}}</ref><ref>{{cite book|last= Wujastyk|first=Dominik|year=2003|title=The Roots of Ayurveda: Selections from Sanskrit Medical Writings|page=222|publisher=Penguin |isbn=9780140448245|url=https://books.google.com/books?id=TaZCwjtmzZYC&q=automata&pg=PA222}}</ref><ref>{{cite book|last=Needham|first=Joseph|year=1965|title=Science and Civilisation in China: Volume 4, Physics and Physical Technology Part 2, Mechanical Engineering|page=164|publisher=Cambridge University Press |isbn=9780521058032|url=https://books.google.com/books?id=SeGyrCfYs2AC&q=bhoja+automata&pg=PA164}}</ref> == Late Medieval (1206–1527) == [[Madhava of Sangamagrama]] (c. 1340 – 1425) and his [[Kerala school of astronomy and mathematics]] developed and founded [[mathematical analysis]].<ref>{{cite web |publisher = School of Mathematics and Statistics University of St Andrews, Scotland |work = Biography of Madhava |author1 = J J O'Connor |author2 = E F Robertson |url = http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |title = Mādhava of Sangamagrāma |access-date = 2007-09-08 |archive-url = https://web.archive.org/web/20060514012903/http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |archive-date = 2006-05-14 |url-status = dead }}</ref> The infinite series for [[pi|π]] was stated by him, and he made use of the series expansion of <math>\arctan x</math> to obtain an infinite series expression, now known as the ''Madhava-Gregory series'', for <math>\pi</math>. Their rational approximation of the ''error'' for the finite sum of their series are of particular interest. They manipulated the error term to derive a faster converging series for <math>\pi</math>. They used the improved series to derive a rational expression,<ref name="roy" /> <math>104348/33215</math> for <math>\pi</math> correct up to nine decimal places, ''i.e.'' <math>3.141592653 </math> (of 3.1415926535897...).<ref name="roy">Roy, 291–306</ref> The development of the [[Series (mathematics)|series]] expansions for [[trigonometric function]]s (sine, cosine, and [[arc tangent]]) was carried out by mathematicians of the Kerala School in the 15th century CE.<ref name="sll" /> Their work, completed two centuries before the invention of [[calculus]] in Europe, provided what is now considered the first example of a [[power series]] (apart from geometric series).<ref name="sll">Stillwell, 173</ref> Mathmatation [[Narayana Pandita (mathematician)|Narayana Pandit]] wrote two works, an arithmetical treatise called ''Ganita Kaumudi'' and an [[Algebra|algebraic]] treatise called ''Bijaganita Vatamsa''. Narayana is also made contributions to algebra and [[Magic square|magic squares]].Narayana's other major works contain a variety of investigations into the second order [[indeterminate equation]] ''nq''<sup>2</sup> + 1 = ''p''<sup>2</sup> ([[Pell's equation]]), solutions of indeterminate [[Degree of a polynomial|higher-order equations]] Narayana has also made contributions to the topic of [[Cyclic quadrilateral|cyclic quadrilaterals]]. The [[Navya Nyaya]] school began around [[East India|eastern India]] and [[Bengal]], and developed theories resembling modern logic, such as [[Gottlob Frege]]'s "distinction between sense and reference of proper names" and his "definition of number," as well as the Navya-Nyaya theory of "restrictive conditions for universals" anticipating some of the developments in modern [[set theory]].<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873|quote=This paper consists of three parts. The first part deals with Frege's distinction between sense and reference of proper names and a similar distinction in Navya-Nyaya logic. In the second part we have compared Frege's definition of number to the Navya-Nyaya definition of number. In the third part we have shown how the study of the so-called 'restrictive conditions for universals' in Navya-Nyaya logic anticipated some of the developments of modern set theory.}}</ref> Udayana in particular developed theories on "restrictive conditions for universals" and "[[Infinity|infinite]] regress" that anticipated aspects of modern set theory. According to Kisor Kumar Chakrabarti:<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873}}</ref> The [[Navya-Nyāya]] or Neo-Logical darśana (school) of Indian philosophy was founded in the 13th century CE by the philosopher [[Gangesha Upadhyaya]] of [[Mithila (India)|Mithila]]. It was a development of the classical Nyāya darśana. Other influences on Navya-Nyāya were the work of earlier philosophers [[Vācaspati Miśra]] (900–980 CE) and [[Udayana]] (late 10th century).Navya-Nyāya developed a sophisticated language and conceptual scheme that allowed it to raise, analyse, and solve problems in logic and epistemology. It systematised all the Nyāya concepts into four main categories: sense or perception (pratyakşa), inference (anumāna), comparison or similarity ([[upamāna]]), and testimony (sound or word; śabda). [[Sher Shah Suri|Shēr Shāh]] of northern India issued silver currency bearing Islamic motifs, later imitated by the [[Mughal Empire]].<ref name="EBAllan&Stern" /> The Chinese merchant [[Ma Huan]] (1413–51) noted that gold coins, known as ''fanam'', were issued in [[Cochin]] and weighed a total of one ''fen'' and one ''li'' according to the Chinese standards.<ref name="Chaudhuri223">Chaudhuri, 223</ref> They were of fine quality and could be exchanged in China for 15 silver coins of four-''li'' weight each.<ref name="Chaudhuri223" /> [[File:Jahangir holding a globe, 1614-1618.jpg|alt=|left|thumb|[[Jahangir]] holding a seamless [[celestial globe]]. This was one of the first examples of Seamless hollow Metallurgy. ]] In 1500, [[Nilakantha Somayaji]] of the [[Kerala school of astronomy and mathematics]], in his [[Tantrasangraha]], revised Aryabhata's elliptical model for the planets Mercury and Venus. His equation of the centre for these planets remained the most accurate until the time of [[Johannes Kepler]] in the 17th century.<ref>Joseph, George G. (2000), ''The Crest of the Peacock: Non-European Roots of Mathematics'', Penguin Books, {{ISBN|0-691-00659-8}}. </ref> Gunpowder and gunpowder weapons were transmitted to India through the [[Mongol invasions of India]].<ref name="Kn">{{cite book|author=Iqtidar Alam Khan|title=Gunpowder And Firearms: Warfare In Medieval India|year=2004|publisher=Oxford University Press|isbn=978-0-19-566526-0}}</ref>{{Request quotation|date=August 2021}}<ref name="kn2" /> The Mongols were defeated by [[Alauddin Khalji]] of the [[Delhi Sultanate]], and some of the Mongol soldiers remained in northern India after their conversion to Islam.<ref name="kn2">{{cite book|author=Iqtidar Alam Khan|title=Historical Dictionary of Medieval India|url=https://books.google.com/books?id=pzZFUcDpDzsC&pg=PA103|date=25 April 2008|publisher=Scarecrow Press|isbn=978-0-8108-5503-8|page=103}}</ref> It was written in the ''Tarikh-i Firishta'' (1606–1607) that the envoy of the Mongol ruler [[Hulagu Khan]] was presented with a [[pyrotechnics]] display upon his arrival in [[Delhi]] in 1258 CE.<ref name="khan 9 10">Khan, 9–10</ref> As a part of an embassy to India by [[Timur]]id leader Shah Rukh (1405–1447), 'Abd al-Razzaq mentioned naphtha-throwers mounted on elephants and a variety of pyrotechnics put on display.<ref name="GF2">Partington, 217</ref> Firearms known as ''top-o-tufak'' also existed in the [[Vijayanagara Empire]] by as early as 1366 CE.<ref name="khan 9 10" /> From then on the employment of [[gunpowder warfare]] in the region was prevalent, with events such as the siege of [[Belgaum]] in 1473 CE by the [[Sultan]] Muhammad Shah Bahmani.<ref name="khan 10">Khan, 10</ref> == Early Modern period (1527–1857 CE) == [[File:Jantar Mantar Delhi 27-05-2005.jpg|alt=|left|thumb|[[Jantar Mantar, New Delhi|Jantar Mantar, Delhi]]—consisting of 13 architectural astronomy instruments, built by [[Jai Singh II]] of Jaipur, from 1724 onwards.]]By the 16th century, [[South Asians]] were manufacturing a diverse variety of firearms; large guns in particular, became visible in [[Tanjore]], [[Dacca]], [[Adil Shahi|Bijapur]] and [[Murshidabad]].<ref name="GF3">Partington, 225</ref> Guns made of bronze were recovered from [[Kozhikode|Calicut]] (1504) and [[Diu, India|Diu]] (1533).<ref name="partingtonquote">Partington, 226</ref> [[Gujarāt]] supplied Europe saltpeter for use in gunpowder warfare during the 17th century.<ref name="IndiaBritannica">Encyclopædia Britannica (2008), ''India.''</ref> [[Bengal]] and [[Malwa|Mālwa]] participated in saltpeter production.<ref name="IndiaBritannica" /> The Dutch, French, Portuguese, and English used [[Chhapra]] as a center of saltpeter refining.<ref>Encyclopædia Britannica (2008), ''Chāpra.''</ref> In ''A History of Greek Fire and Gunpowder'', [[James Riddick Partington]] describes the gunpowder warfare of 16th and 17th century [[Mughal Empire|Mughal]] India, and writes that "Indian war rockets were good weapons before such rockets were used in Europe. They had bamboo rods, a rocket-body lashed to the rod, and iron points. They were directed at the target and fired by lighting the fuse, but the trajectory was rather erratic... The use of mines and counter-mines with explosive charges of gunpowder is mentioned for the times of Akbar and Jahāngir."<ref name="partingtonquote" /> The construction of water works and aspects of water technology in [[South Asia]] is described in [[Arabic]] and [[Persian language|Persian]] works.<ref name=Siddiqui/> During medieval times, the diffusion of [[South Asian]] and [[Iran|Persian]] irrigation technologies gave rise to an advanced irrigation system which bought about growth and also helped in the growth of material culture.<ref name=Siddiqui>Siddiqui, 52–77</ref> The founder of the [[cashmere wool]] industry is believed traditionally held to be the 15th-century ruler of Kashmir, Zayn-ul-Abidin, who introduced weavers from [[Central Asia]].<ref name=ebpasm/> The scholar Sadiq Isfahani of [[Jaunpur, Uttar Pradesh|Jaunpur]] compiled an [[atlas]] of the parts of the world which he held to be 'suitable for human life'.<ref name=Schwartzberg1302>Schwartzberg, 1302</ref> The 32 sheet atlas—with maps oriented towards the south as was the case with Islamic works of the era—is part of a larger scholarly work compiled by Isfahani during 1647 CE.<ref name=Schwartzberg1302/> According to Joseph E. Schwartzberg (2008): 'The largest known Indian map, depicting the former [[Rajput]] capital at [[Kingdom of Amber|Amber]] in remarkable house-by-house detail, measures 661 × 645&nbsp;cm.<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> (260 × 254 in., or approximately 22 × 21&nbsp;ft).'<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> The seamless [[celestial globe]] was invented in Kashmir by Ali Kashmiri ibn Luqman in 998 AH (1589–90 CE), and twenty other such [[globe]]s were later produced in [[Lahore]] and Kashmir during the [[Mughal Empire]].<ref name="Emilie">Savage-Smith (1985)</ref> These Indian metallurgists pioneered the method of [[lost-wax casting]] in order to produce these globes.<ref name="Emilie" /><ref name="voss">{{cite book |last=Roy |first=Tirthankar |title=The Ashgate Companion to the History of Textile Workers, 1650–2000 |publisher=[[Ashgate Publishing]] |year=2010 |isbn=978-0-7546-6428-4 |editor1=Lex Heerma van Voss |page=255 |chapter=The Long Globalization and Textile Producers in India |author-link=Tirthankar Roy |editor2=Els Hiemstra-Kuperus |editor3=Elise van Nederveen Meerkerk |chapter-url={{google books |plainurl=y |id=f95ljbhfjxIC|page=255}}}}</ref>[[File:NL-HaNA 1.11.01.01 1276 1R Brief van J.G. van Angelbeek, gouverneur van Ceylon, uit Cochin, aan de heer Decker, berichtend over de strijd tussen Tipoe en de vorst van Travancone. 1790 januari 14 (cropped).jpg|left|thumb|[[Mysorean rockets]]]] [[Hyder Ali]], prince of Mysore, developed war rockets with an important change: the use of metal cylinders to contain the combustion powder. Although the hammered soft iron he used was crude, the bursting strength of the container of black powder was much higher than the earlier paper construction. Thus a greater internal pressure was possible, with a resultant greater thrust of the propulsive jet. The rocket body was lashed with leather thongs to a long bamboo stick. Range was perhaps up to three-quarters of a mile (more than a kilometre). Although individually these rockets were not accurate, dispersion error became less important when large numbers were fired rapidly in mass attacks. They were particularly effective against cavalry and were hurled into the air, after lighting, or skimmed along the hard dry ground. Hyder Ali's son, [[Tipu Sultan]], continued to develop and expand the use of rocket weapons, reportedly increasing the number of rocket troops from 1,200 to a corps of 5,000. In battles at [[Seringapatam]] in 1792 and 1799 these rockets were used with considerable effect against the British. By the end of the 18th century the postal system in the region had reached high levels of efficiency.<ref name="Peabody1">Peabody, 71</ref> According to Thomas Broughton, the [[Maharaja]] of [[Jodhpur]] sent daily offerings of fresh flowers from his capital to Nathadvara (320&nbsp;km) and they arrived in time for the first religious [[Darśana|Darshan]] at sunrise.<ref name="Peabody1" /> Later this system underwent modernization with the establishment of the [[British Raj]].<ref name="Lowe" /> == Colonial era (1858–1947 CE) == <br /><div style="text-align: center;"><gallery widths="140" heights="140"> File:J.C.Bose.JPG|[[Jagadish Chandra Bose]] laid the foundations of experimental science in the [[Indian subcontinent]].<ref>Chatterjee, Santimay and Chatterjee, Enakshi, ''Satyendranath Bose'', 2002 reprint, p. 5, National Book Trust, {{ISBN|81-237-0492-5}}</ref> He is considered one of the fathers of radio science.<ref>{{cite conference|title=Sir J.C. Bose and radio science|last1=Sen|first1=A. K.|date=1997|publisher=IEEE|book-title=Microwave Symposium Digest|pages=557–560|location=Denver, CO|conference=IEEE MTT-S International Microwave Symposium|isbn=0-7803-3814-6|doi=10.1109/MWSYM.1997.602854}}</ref> File:IndianRailways1871b.jpg|Extent of the railway network in India in 1871; construction had begun in 1856. File:India railways1909a.jpg|The Indian railways network in 1909. File:SatyenBose1925.jpg|Physicist [[Satyendra Nath Bose]] is known for his work on the [[Bose–Einstein statistics]] during the 1920s. File:Sir CV Raman.JPG|[[C. V. Raman]], known for his research in the field of light scattering, also known as [[Raman scattering]]. </gallery> </div> The Post Office Act XVII of 1837 enabled the [[Governor-General of India]] to convey messages by post within the territories of the [[East India Company]].<ref name="Lowe" /> Mail was available to some officials without charge, which became a controversial privilege as the years passed.<ref name="Lowe" /> The Indian Post Office service was established on October 1, 1837.<ref name="Lowe">Lowe, 134</ref> The British also constructed a vast [[railway]] network in the region for both strategic and commercial reasons.<ref>Seaman, 348</ref> The British education system, aimed at producing able civil and administrative services candidates, exposed a number of Indians to foreign institutions.<ref name=Rajendran>Raja (2006)</ref> [[Sir Jagadis Chandra Bose|Jagadis Chandra Bose]] (1858–1937), [[Prafulla Chandra Ray]] (1861–1944), [[Satyendra Nath Bose]] (1894–1974), [[Meghnad Saha]] (1893–1956), [[P. C. Mahalanobis]] (1893–1972), [[C. V. Raman]] (1888–1970), [[Subrahmanyan Chandrasekhar]] (1910–1995), [[Homi J. Bhabha|Homi Bhabha]] (1909–1966), [[Srinivasa Ramanujan]] (1887–1920), [[Vikram Sarabhai]] (1919–1971), [[Har Gobind Khorana]] (1922–2011), [[Harish Chandra]] (1923–1983), [[Abdus Salam]] (1926–1996) and [[E. C. George Sudarshan]] (1933-2018) were among the notable scholars of this period.<ref name=Rajendran/> Extensive interaction between colonial and native sciences was seen during most of the colonial era.<ref name=Arnold211>Arnold, 211</ref> Western science came to be associated with the requirements of nation building rather than being viewed entirely as a colonial entity,<ref name=Arnold212/> especially as it continued to fuel necessities from agriculture to commerce.<ref name=Arnold211/> Scientists from India also appeared throughout Europe.<ref name=Arnold212>Arnold, 212</ref> By the time of India's independence colonial science had assumed importance within the westernized intelligentsia and establishment. French astronomer, Pierre Janssen observed the Solar eclipse of 18 August 1868 and discovered helium, from Guntur in Madras State, British India.<ref name=Arnold212/> == Post-Independence (1947 CE – present) == {{Main|Science and technology in India|Science and technology in Pakistan|Science and technology in Bangladesh}} ==See also== {{col div|colwidth=30em}} * [[List of Indian engineering colleges before Independence]] * [[List of Indian inventions and discoveries]] * [[Timeline of historic inventions]] * [[Timeline of Indian innovation]] * [[Science and technology in India]] ** [[Engineering education in India]] ** [[Information technology in India]] ** [[Science and technology studies in India]] ** [[Nalanda University]] {{colend}} ==Notes== {{reflist|3|refs= <ref name=":0">{{Cite book|title = An English Translation of the Sushruta Samhita, based on Original Sanskrit Text|last = Bhishagratna|first = Kunjalal|year = 1907|location = Calcutta|pages = 1|url = https://archive.org/stream/englishtranslati01susruoft#page/n103/mode/2up|ref = bhishagratna}}</ref> <ref name=History2010>{{cite book |veditors=Poretsky L |title=Principles of diabetes mellitus |year=2009 |publisher=Springer |location=New York|isbn=978-0-387-09840-1|page=3|url=https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |edition=2nd |url-status=live |archive-url=https://web.archive.org/web/20160404170919/https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |archive-date=2016-04-04}}</ref> }} ==References== * Allan, J. & Stern, S. M. (2008), ''coin'', Encyclopædia Britannica. * Allchin, F.R. (1979), ''South Asian Archaeology 1975: Papers from the Third International Conference of the Association of South Asian Archaeologists in Western Europe, Held in Paris'' edited by J.E.van Lohuizen-de Leeuw, Brill Academic Publishers, {{ISBN|90-04-05996-2}}. * Ahmad, S. (2005), "Rise and Decline of the Economy of Bengal", ''Asian Affairs'', '''27''' (3): 5–26. * Arnold, David (2004), ''[[The New Cambridge History of India]]: Science, Technology and Medicine in Colonial India'', Cambridge University Press, {{ISBN|0-521-56319-4}}. * Baber, Zaheer (1996), ''The Science of Empire: Scientific Knowledge, Civilization, and Colonial Rule in India'', State University of New York Press, {{ISBN|0-7914-2919-9}}. * Balasubramaniam, R. (2002), ''Delhi Iron Pillar: New Insights'', Indian Institute of Advanced Studies, {{ISBN|81-7305-223-9}}. * BBC (2006), [http://news.bbc.co.uk/2/hi/science/nature/4882968.stm "Stone age man used dentist drill"]. * Bourbaki, Nicolas (1998), ''Elements of the History of Mathematics'', Springer, {{ISBN|3-540-64767-8}}. * {{citation |first=C.B. |last=Boyer |author-link=Carl Benjamin Boyer |title=A History of Mathematics |edition=2nd |place=New York |publisher=Wiley |year=1991 |orig-year=1989 |isbn=978-0-471-54397-8 |url=https://archive.org/details/historyofmathema00boye}} * Broadbent, T. A. A. (1968), "Reviewed work(s): The History of Ancient Indian Mathematics by C. N. Srinivasiengar", ''The Mathematical Gazette'', '''52''' (381): 307–308. * {{Citation |last1=Bourbaki |first1=Nicolas |author-link=Nicolas Bourbaki |year=1998 |title=Elements of the History of Mathematics |publisher=Berlin, Heidelberg, and New York: [[Springer-Verlag]], 301 pages |isbn=978-3-540-64767-6 |url-access=registration |url=https://archive.org/details/elementsofhistor0000bour}}. * Ceccarelli, Marco (2000), ''International Symposium on History of Machines and Mechanisms: Proceedings HMM Symposium'', Springer, {{ISBN|0-7923-6372-8}}. * {{Cite book |last=Chattopadhyaya |first=Debiprasad |title=History of science and technology in ancient India: the beginnings |year=1986 |publisher=Firma KLM Pvt. Ltd |isbn=81-7102-053-4 |oclc=45345319}} * {{Cite book|last=Choudhury|first=Sarojakanta.|url=http://worldcat.org/oclc/224913142|title=Educational philosophy of Dr. Sarvepalli Radhakrishnan|date=2006|publisher=Deep & Deep Publications|isbn=81-7629-766-6|oclc=224913142}} * Chaudhuri, K. N. (1985), ''Trade and Civilisation in the Indian Ocean'', Cambridge University Press, {{ISBN|0-521-28542-9}}. * Craddock, P.T. etc. (1983), ''Zinc production in medieval India'', World Archaeology, '''15''' (2), Industrial Archaeology. * Cooke, Roger (2005), ''The History of Mathematics: A Brief Course'', Wiley-Interscience, {{ISBN|0-471-44459-6}}. * Coppa, A. etc. (2006), "Early neolithic tradition of dentistry", ''Nature'', '''440''': 755–756. * Dales, George (1974), "Excavations at Balakot, Pakistan, 1973", ''Journal of Field Archaeology'', '''1''' (1–2): 3–22 [10]. * Dhavalikar, M. K. (1975), "The beginning of coinage in India", ''World Archaeology'', '''6''' (3): 330–338, Taylor & Francis. * Dikshitar, V. R. R. (1993), ''The Mauryan Polity'', Motilal Banarsidass, {{ISBN|81-208-1023-6}}. * Drakonoff, I. M. (1991), ''Early Antiquity'', University of Chicago Press, {{ISBN|0-226-14465-8}}. * Fowler, David (1996), "Binomial Coefficient Function", ''The American Mathematical Monthly'', '''103''' (1): 1–17. * Finger, Stanley (2001), ''Origins of Neuroscience: A History of Explorations Into Brain Function'', Oxford University Press, {{ISBN|0-19-514694-8}}. * Ghosh, Amalananda (1990), ''An Encyclopaedia of Indian Archaeology'', Brill Academic Publishers, {{ISBN|90-04-09262-5}}. * Hayashi, Takao (2005), "Indian Mathematics", ''The Blackwell Companion to Hinduism'' edited by Gavin Flood, pp.&nbsp;360–375, Basil Blackwell, {{ISBN|978-1-4051-3251-0}}. * Hopkins, Donald R. (2002), ''The Greatest Killer: Smallpox in history'', University of Chicago Press, {{ISBN|0-226-35168-8}}. * Ifrah, Georges (2000), ''A Universal History of Numbers: From Prehistory to Computers'', Wiley, {{ISBN|0-471-39340-1}}. * Joseph, G. G. (2000), ''The Crest of the Peacock: The Non-European Roots of Mathematics'', Princeton University Press, {{ISBN|0-691-00659-8}}. * Kearns, Susannah C.J. & Nash, June E. (2008), ''leprosy'', Encyclopædia Britannica. * Kenoyer, J.M. (2006), "Neolithic Period", ''Encyclopedia of India (vol. 3)'' edited by Stanley Wolpert, Thomson Gale, {{ISBN|0-684-31352-9}}. * Khan, Iqtidar Alam (1996), ''Coming of Gunpowder to the Islamic World and North India: Spotlight on the Role of the Mongols'', Journal of Asian History '''30''': 41–5 . * Kieschnick, John (2003), ''The Impact of Buddhism on Chinese Material Culture'', Princeton University Press, {{ISBN|0-691-09676-7}}. * Kriger, Colleen E. & Connah, Graham (2006), ''Cloth in West African History'', Rowman Altamira, {{ISBN|0-7591-0422-0}}. * Lade, Arnie & Svoboda, Robert (2000), ''Chinese Medicine and Ayurveda'', Motilal Banarsidass, {{ISBN|81-208-1472-X}}. * Lal, R. (2001), "Thematic evolution of ISTRO: transition in scientific issues and research focus from 1955 to 2000", ''Soil and Tillage Research'', '''61''' (1–2): 3–12 [3]. * Lee, Sunggyu (2006), ''Encyclopedia of Chemical Processing'', CRC Press, {{ISBN|0-8247-5563-4}}. * Livingston, Morna & Beach, Milo (2002), ''Steps to Water: The Ancient Stepwells of India'', Princeton Architectural Press, {{ISBN|1-56898-324-7}}. * Lock, Stephen etc. (2001), ''The Oxford Illustrated Companion to Medicine'', Oxford University Press, {{ISBN|0-19-262950-6}}. * Lowe, Robson (1951), ''The Encyclopedia of British Empire Postage Stamps, 1661–1951 (vol. 3)''. * MSNBC (2008), [http://www.nbcnews.com/id/12168308 "Dig uncovers ancient roots of dentistry"]. * Nair, C.G.R. (2004), [http://www.kerala.gov.in/keralcallsep04/p22-24.pdf "Science and technology in free India"] {{Webarchive|url=https://web.archive.org/web/20060821195309/http://www.kerala.gov.in/keralcallsep04/p22-24.pdf |date=2006-08-21 }}, ''Government of Kerala—Kerala Call'', Retrieved on 2006-07-09. * O'Connor, J. J. & Robertson, E.F. (1996), [https://web.archive.org/web/20130120084848/http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Trigonometric_functions.html "Trigonometric functions"], ''[[MacTutor History of Mathematics Archive]]''. * O'Connor, J. J. & Robertson, E. F. (2000), [http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Paramesvara.html "Paramesvara"], ''[[MacTutor History of Mathematics archive]]''. * Partington, James Riddick & Hall, Bert S. (1999), ''A History of Greek Fire and Gunpowder'', Johns Hopkins University Press, {{ISBN|0-8018-5954-9}}. * Peabody, Norman (2003), ''Hindu Kingship and Polity in Precolonial India'', Cambridge University Press, {{ISBN|0-521-46548-6}}. * Peele, Stanton & Marcus Grant (1999), ''Alcohol and Pleasure: A Health Perspective'', Psychology Press, {{ISBN|1-58391-015-8}}. * Piercey, W. Douglas & Scarborough, Harold (2008), ''hospital'', Encyclopædia Britannica. * Pingree, David (2003), "The logic of non-Western science: mathematical discoveries in medieval India", ''Daedalus'', '''132''' (4): 45–54. * Raja, Rajendran (2006), "Scientists of Indian origin and their contributions", ''Encyclopedia of India (Vol 4.)'' edited by Stanley Wolpert, {{ISBN|0-684-31512-2}}. * Rao, S. R. (1985), ''Lothal'', Archaeological Survey of India. * Rodda & Ubertini (2004), ''The Basis of Civilization—Water Science?'', International Association of Hydrological Science, {{ISBN|1-901502-57-0}}. * Roy, Ranjan (1990), "Discovery of the Series Formula for <math> \pi </math> by Leibniz, Gregory, and Nilakantha", ''Mathematics Magazine'', Mathematical Association of America, '''63''' (5): 291–306. * Sanchez & Canton (2006), ''Microcontroller Programming: The Microchip PIC'', CRC Press, {{ISBN|0-8493-7189-9}}. * [[Savage-Smith, Emilie]] (1985), ''Islamicate Celestial Globes: Their History, Construction, and Use'', Smithsonian Institution Press, Washington, D.C. * Schwartzberg, Joseph E. (2008), "Maps and Mapmaking in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;1301–1303, Springer, {{ISBN|978-1-4020-4559-2}}. * Seaman, Lewis Charles Bernard (1973), ''Victorian England: Aspects of English and Imperial History 1837–1901'', Routledge, {{ISBN|0-415-04576-2}}. * Seidenberg, A. (1978), ''The origin of mathematics'', Archive for the history of Exact Sciences, '''18''': 301–342. * Sellwood, D. G. J. (2008), ''coin'', Encyclopædia Britannica. * Shaffer, Lynda N., "Southernization", ''Agricultural and Pastoral Societies in Ancient and Classical History'' edited by Michael Adas, pp.&nbsp;308–324, Temple University Press, {{ISBN|1-56639-832-0}}. * Sharpe, Peter (1998), ''[https://web.archive.org/web/20080518084734/http://www.siu.edu/~ebl/leaflets/sugar.htm Sugar Cane: Past and Present]'', Southern Illinois University. * Siddiqui, I. H. (1986), "Water Works and Irrigation System in India during Pre-Mughal Times", ''Journal of the Economic and Social History of the Orient'', '''29''' (1): 52–77. * Singh, A. N. (1936), "On the Use of Series in Hindu Mathematics", ''Osiris'', '''1''': 606–628. * Sircar, D.C.C. (1990), ''Studies in the Geography of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|81-208-0690-5}}. * Smith, David E. (1958). ''History of Mathematics''. Courier Dover Publications. {{ISBN|0-486-20430-8}}. * Srinivasan, S. & Griffiths, D., "South Indian wootz: evidence for high-carbon steel from crucibles from a newly identified site and preliminary comparisons with related finds", ''Material Issues in Art and Archaeology-V'', Materials Research Society Symposium Proceedings Series Vol. 462. * [https://web.archive.org/web/20181119033451/http://materials.iisc.ernet.in/~wootz/heritage/WOOTZ.htm Srinivasan, S. & Ranganathan, S., ''Wootz Steel: An Advanced Material of the Ancient World'', Bangalore: Indian Institute of Science.] * Srinivasan, S. (1994), "Wootz crucible steel: a newly discovered production site in South India", Institute of Archaeology, University College London, '''5''': 49–61. * Stein, Burton (1998), ''A History of India'', Blackwell Publishing, {{ISBN|0-631-20546-2}}. * Stillwell, John (2004), ''Mathematics and its History (2 edition)'', Springer, {{ISBN|0-387-95336-1}}. * Subbaarayappa, B.V. (1989), "Indian astronomy: an historical perspective", ''Cosmic Perspectives'' edited by Biswas etc., pp.&nbsp;25–41, Cambridge University Press, {{ISBN|0-521-34354-2}}. * Teresi, Dick etc. (2002), ''Lost Discoveries: The Ancient Roots of Modern Science—from the Babylonians to the Maya'', Simon & Schuster, {{ISBN|0-684-83718-8}}. * Tewari, Rakesh (2003), "The origins of Iron Working in India: New evidence from the central Ganga plain and the eastern Vindhyas", ''Antiquity'', '''77''' (297): 536–544. * Thrusfield, Michael (2007), ''Veterinary Epidemiology'', Blackwell Publishing, {{ISBN|1-4051-5627-9}}. * Tripathi, V.N. (2008), "Astrology in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;264–267, Springer, {{ISBN|978-1-4020-4559-2}}. * Wenk, Hans-Rudolf etc. (2003), ''Minerals: Their Constitution and Origin'', Cambridge University Press, {{ISBN|0-521-52958-1}}. * White, Lynn Townsend, Jr. (1960), "Tibet, India, and Malaya as Sources of Western Medieval Technology", ''The American Historical Review'' '''65''' (3): 522–526. * Whish, Charles (1835), ''Transactions of the Royal Asiatic Society of Great Britain and Ireland''. ==Further reading== *Alvares, Claude A. (1991) ''Decolonizing history: Technology and culture in India, China and the West 1492 to the Present Day'', New York, USA: Apex Press. [http://www.indianscience.org/essays/29-%20E--F-Decolonising%20History.pdf (review)] * Dharampal (1971) ''Indian Science and Technology in the Eighteenth Century: Some Contemporary European Accounts'' (with a foreword by Dr. D.S..Kothari and Introduction by Dr. William A.Blanpeid), Impex India, Delhi, 1971; reprinted by Academy of Gandhian Studies, Hyderabad 1983. * Anant Priolkar (1958) ''[https://archive.org/details/PrintingPressInIndia The printing press in India, its beginnings and early development; being a quarter-centenary commemoration study of the advent of printing in India] (in 1556).'' xix, 364 S., Bombay: Marathi Samshodhana Mandala, {{doi|10.1017/S0041977X00151158}} * [[Debiprasad Chattopadhyaya]] (1977) ''History of Science and Technology in Ancient India: The Beginnings'' with a foreword by Joseph Needham. * [[Project of History of Indian Science, Philosophy and culture]], Volume 4. Fundamental Indian Ideas in Physics, Chemistry, Life Sciences and Medicine * Project of History of Indian Science, Philosophy and Culture, Monograph series, Volume 3. Mathematics, Astronomy and Biology in Indian Tradition edited by D. P. Chattopadhyaya and Ravinder Kumar * [[T. A. Sarasvati Amma]] (2007)[1979] ''Geometry of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|978-81-208-1344-1}} * Shinde, V., Deshpande, S. S., Sarkar, A. (2016) ''Chalcolithic South Asia: Aspects of crafts and technologies'', Indus-Infinity Foundation *In Hāṇḍā, O. (2015) ''Reflections on the history of Indian science and technology'', New Delhi: Pentagon Press in association with Indus-Infinity Foundation. ==External links== {{Wikiquote}} *[https://web.archive.org/web/20181018060358/http://www.nscdelhi.org/exhibition-gallery.php?gallery=184 Our Science and Technology Heritage] gallery for the [[National Science Centre, Delhi|National Science Centre]] in Delhi * [http://www.iish.org/index.php?option=com_content&view=article&id=71:a-brief-introduction-to-technological-brilliance-of-ancient-india&catid=37:heritage-india-news&Itemid=56 A brief introduction to technological brilliance of Ancient India] (Indian Institute of Scientific Heritage) * [http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf Science and Technology in Ancient India] {{Webarchive|url=https://web.archive.org/web/20150501145738/http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf |date=2015-05-01 }} * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy. * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * [[Indian National Science Academy]] (2001), ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy, * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.1, January 2010, National Council of Science Museums, Kolkata, India, by S.M Khened, [https://web.archive.org/web/20110721162652/http://ncsm.gov.in/science_pdf/Shivaprasad%20Khened.pdf]. * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.2, July, 2010, pages 124–132, National Council of Science Museums, Kolkata, India, by S.M Khened,[https://web.archive.org/web/20110721161448/http://ncsm.gov.in/science_pdf/Propagation%20Vol%202%20-%2008%20Science%20Centres.pdf]. * ''History of Science in South Asia'' ([http://hssa-journal.org hssa-journal.org]). HSSA is a peer-reviewed, open-access, online journal for the history of science in India. {{Indianscience}} {{Science and technology in Pakistan}} {{History of science}} {{History of technology}} {{DEFAULTSORT:History Of Indian Science And Technology}}{{South Asian topics}} [[Category:History of science and technology in India| ]] [[Category:History of science and technology in Pakistan| ]] f870ca57858a68db92c8904a7345d224f5ba0682 Nowrap 0 579 1183 1182 2024-03-16T12:41:14Z Motzoid India 2 1 revision imported wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> 5d0dc6b6d89b37f4356242404f46138a4017f015 Yesno 0 582 1189 1188 2024-03-16T12:41:21Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Pagetype 0 583 1191 1190 2024-03-16T12:41:21Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> b8e6aa66678cd57877ea2c607372a45070f030a7 Yesno-yes 0 584 1193 1192 2024-03-16T12:41:21Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Short description 0 585 1195 1194 2024-03-16T12:41:23Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#ifeq:{{lc:{{{1|}}}}}|none|<nowiki /><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 119 | 828 | 829 | = exclude|#default=}}|exclude||[[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with short description]]}}}}}}</includeonly><!-- Start tracking -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using short description with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Short description]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | pagetype | bot |plural }}<!-- -->{{#ifexpr: {{#invoke:String|len|{{{1|}}}}}>100 | [[Category:{{{pagetype|{{pagetype |defaultns = extended |plural=y}}}}} with long short description]]}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pages with empty short description]]}}</includeonly><!-- -->{{Short description/lowercasecheck|{{{1|}}}}}<!-- -->{{Main other |{{SDcat |sd={{{1|}}} }} }}<noinclude> {{Documentation}} </noinclude> f175a6d61b40a87adb43e2dd4f73c7979759b34c Main other 0 586 1197 1196 2024-03-16T12:41:23Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Short description/lowercasecheck 0 587 1199 1198 2024-03-16T12:41:23Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#ifeq:<!--test first character for lower-case letter-->{{#invoke:string|find|1={{{1|}}}|2=^%l|plain=false}}|1 |<!-- first character is a lower case letter; test against whitelist -->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist--> |c. <!--for circa--> |gTLD |iMac |iOS |iOS, |iPad |iPhone |iTunes |macOS |none |pH |pH-dependent=<!-- end whitelist; short description starts with an allowed lower-case string; whitelist matched; do nothing --> |#default=<!-- apply category to track lower-case short descriptions -->{{main other|[[Category:Pages with lower-case short description|{{trim|{{{1|}}}}}]]}}{{Testcases other|{{red|CATEGORY APPLIED}}}}<!-- end whitelist test -->}} |<!-- short description does not start with lower-case letter; do nothing; end lower-case test --> }}<noinclude> {{documentation}} </noinclude> 9a6d4db14b74614625fd234b4f8ee3c8e1a235c0 SDcat 0 588 1201 1200 2024-03-16T12:41:24Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:SDcat |setCat}}</includeonly><noinclude> {{documentation}} </noinclude> 8c6e8783ddb0dc699d6fb60370db97b73725b9a6 Nobold 0 589 1203 1202 2024-03-16T12:41:24Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Nobold/styles.css"/><span class="nobold">{{{1}}}</span><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 9c92b5951772bb26ca0fbe9256418b65e47700dd Nobold/styles.css 0 590 1205 1204 2024-03-16T12:41:24Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } 83e5f0adacf8c7984251f1fd9d11ed82ebaadf03 Hlist 0 591 1207 1206 2024-03-16T12:41:24Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Reflist 0 596 1217 1216 2024-03-16T12:41:29Z Motzoid India 2 1 revision imported wikitext text/x-wiki <templatestyles src="Reflist/styles.css" /><div class="reflist <!-- -->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!-- -->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!-- -->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class -->{{#if: {{{1|}}}<!-- start style --> | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}} | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}} }}> {{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude> {{Documentation}} </noinclude> 8c65cc88272db6c0f5cf2b49f84d3e460e60ee5f Reflist/styles.css 0 597 1219 1218 2024-03-16T12:41:29Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ /* can we remove the font size declarations? .references gets a font-size in * common.css that is always 90, and there is nothing else in reflist out in * the wild. May affect column sizes. */ .reflist { font-size: 90%; /* Default font-size */ margin-bottom: 0.5em; list-style-type: decimal; } .reflist .references { font-size: 100%; /* Reset font-size when nested in div.reflist */ margin-bottom: 0; /* Avoid double margin when nested in div.reflist */ list-style-type: inherit; /* Enable custom list style types */ } /* columns-2 and columns-3 are legacy for "2 or more" column view from when the * template was implemented with column-count. */ .reflist-columns-2 { column-width: 30em; } .reflist-columns-3 { column-width: 25em; } /* Reset top margin for lists embedded in columns */ .reflist-columns { margin-top: 0.3em; } .reflist-columns ol { margin-top: 0; } /* Avoid elements breaking between columns */ .reflist-columns li { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } .reflist-upper-alpha { list-style-type: upper-alpha; } .reflist-upper-roman { list-style-type: upper-roman; } .reflist-lower-alpha { list-style-type: lower-alpha; } .reflist-lower-greek { list-style-type: lower-greek; } .reflist-lower-roman { list-style-type: lower-roman; } 531a26d48f0e7826c61f764cfb7d5fb200032c34 Icon 0 600 1225 1224 2024-03-16T12:41:30Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Icon|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> bd5b855953c5eec9d9c48400aa39315cb4218558 Main 0 601 1227 1226 2024-03-16T12:41:30Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Navbox 0 602 1229 1228 2024-03-16T12:41:31Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec See also 0 603 1231 1230 2024-03-16T12:41:31Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|See also}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 74d2ab6a0df5605fbe2085c405925ec659be52b7 Sidebar 0 604 1233 1232 2024-03-16T12:41:31Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Sidebar with collapsible lists 0 605 1235 1234 2024-03-16T12:41:32Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke: Sidebar | collapsible }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 4bd1f39f9101790ed6e315752e377a8ac7a95869 Hatnote/styles.css 0 606 1237 1236 2024-03-16T12:41:33Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Navbar/styles.css 0 607 1239 1238 2024-03-16T12:41:35Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Navbox/styles.css 0 608 1241 1240 2024-03-16T12:41:36Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Sidebar/styles.css 0 609 1243 1242 2024-03-16T12:41:37Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb About 0 610 1245 1244 2024-03-16T12:41:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:about|about}}<noinclude> {{Documentation}} </noinclude> 34b07e47d9b8220bf56dd9882945ad464b21a731 Google books 0 611 1247 1246 2024-03-16T12:41:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#if:{{{plainurl|{{{plain-url|}}}}}}|https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}}|''[https://books.google.com/books?id={{trim|{{{1|{{{id}}}}}}}}{{#if:{{{page|}}}|&pg=PA{{{page|}}}|{{#if:{{{pg|}}}|&pg={{{pg}}}}}}}{{#if:{{{text|}}}|&dq={{urlencode:"{{{text|}}}"}}}}{{#if:{{{keywords|}}}|&q={{urlencode:{{{keywords}}}}}}} {{{2|{{{title|{{PAGENAME}}}}}}}}]''{{#if:{{{page|}}}|, p. {{{page}}},}} at [[Google Books]]}}<noinclude>{{Documentation}}</noinclude> 0afd3937437e12049b2123482135d6e8271203b9 Trim 0 612 1249 1248 2024-03-16T12:41:38Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{safesubst:#if:1|{{{1|}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 3d29fbfff9683523147db6e1f55c0e17ed30863b Side box 0 616 1257 1256 2024-03-16T12:41:40Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> f02d48c7bd2f7bc64e2982d16b3578c99137d27e Sister project 0 617 1259 1258 2024-03-16T12:41:40Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | wikifunctions = Wikifunctions-logo.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> 9bab46e6907b835c6af71184149f8c81afa6f1b1 Yesno-no 0 618 1261 1260 2024-03-16T12:41:41Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Harvnb 0 621 1267 1266 2024-03-16T12:41:41Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT[[Template:Harvard citation no brackets]] 207579e59ab79c1932b97f6a2f1fe1ab8d0a5d2a Webarchive 0 625 1275 1274 2024-03-16T12:41:43Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:webarchive|webarchive}}</includeonly><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 592dc8f562cc0b9c49d38f1ef771b327fe8a5d0a ISBN 0 627 1279 1278 2024-03-16T12:41:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#if:{{{1|}}}|{{Catalog lookup link |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}| article-link={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||{{#ifeq:{{yesno-yes|{{{link|}}}}}|no||ISBN (identifier)}}}} |article-name={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISBN}} |link-prefix=[Special:BookSources/ |item-prefix={{!}} |item-postfix=] |list-leadout={{{leadout|}}} }}{{#ifeq:{{yesno-no|{{{invalid1|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{1|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{2|}}} |{{#ifeq:{{yesno-no|{{{invalid2|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{2|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{3|}}} |{{#ifeq:{{yesno-no|{{{invalid3|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{3|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{4|}}} |{{#ifeq:{{yesno-no|{{{invalid4|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{4|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{5|}}} |{{#ifeq:{{yesno-no|{{{invalid5|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{5|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{6|}}} |{{#ifeq:{{yesno-no|{{{invalid6|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{6|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{7|}}} |{{#ifeq:{{yesno-no|{{{invalid7|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{7|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{8|}}} |{{#ifeq:{{yesno-no|{{{invalid8|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{8|}}}|template_name={{{template_name|ISBN}}}}}}}{{#if:{{{9|}}} |{{#ifeq:{{yesno-no|{{{invalid9|}}}}}|yes|{{main other|[[Category:Pages with listed invalid ISBNs]]}}|{{#invoke:check isxn|check_isbn|{{{9|}}}|template_name={{{template_name|ISBN}}}}}}}}}}}}}}}}}}}}}}}| {{error-small|Parameter error in {{tl|ISBN}}: Missing [[ISBN]].}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using ISBN template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:ISBN]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | invalid1 | invalid2 | invalid3 | invalid4 | invalid5 | invalid6 | invalid7 | invalid8 | invalid9 | leadout | link | plainlink |template_name }}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude> 113f1e5cb33437d5e9ada6d1e37a951670fae7d9 Transl 0 628 1281 1280 2024-03-16T12:41:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Transliteration]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} cff0d040d26c532c6c3a93a603e86991019a8fba Transliteration 0 629 1283 1282 2024-03-16T12:41:45Z Motzoid India 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Lang|transl}}</includeonly><noinclude> {{documentation}} </noinclude> cf981ec0dfa428550086604e3a81e36da231f3df Wikiquote 0 634 1293 1292 2024-03-16T12:41:47Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Sister project |project=wikiquote |text=Wikiquote has {{{3|quotations related to}}} '''''[[q:{{{1|Special:Search/{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}]]'''''. }}<noinclude> {{Documentation}} </noinclude> 6faad160b81cfbd2ffe6cd485ea2c2e7d4334f24 Request quotation 0 635 1295 1294 2024-03-16T12:41:47Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Request quotation}} begin-->{{Fix | subst = <includeonly>{{subst:</includeonly><includeonly>substcheck}}</includeonly> | link = Wikipedia:Verifiability | text = need quotation to verify | title = Quotation needed from source to verify. {{{reason|}}} | date = {{{date|}}} | cat-date = Category:Wikipedia articles needing factual verification }}<!--{{Request quotation}} end--> }}<noinclude> {{Documentation}} </noinclude> 1994f69cdcf29fb2b25edad36e83eae42aa0274b IAST 0 637 1299 1298 2024-03-16T12:41:48Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{transl|sa|IAST|{{{1}}}}}<noinclude> {{documentation}} </noinclude> 1c8047208bfafb1a6a3d8d26eccc3df12e9ae86c History of technology 0 640 1305 1304 2024-03-16T12:41:49Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{navbox | name = History of technology | title = [[History of technology]] | listclass = hlist | state = {{{state<includeonly>|autocollapse</includeonly>}}} | list1 = * '''History of technology cultures''' * [[Outline of prehistoric technology|Prehistoric technology]] * [[Neolithic Revolution|Neolithic]] * [[Ancient Egyptian technology|Ancient Egypt]] * [[Maya civilization|Mayan]] * [[Inca technology|Inca]] * [[Ancient Greek technology|Ancient Greek]] * [[Roman technology|Roman]] * [[History of science and technology in China|Chinese]] * [[History of science and technology in the Indian subcontinent|Indian]] * [[List of Byzantine inventions|Byzantine]] * [[Science in the medieval Islamic world|Medieval Islam]] * [[Medieval technology|Medieval Europe]] * [[Renaissance technology|Renaissance]] * [[Science and technology in the Ottoman Empire|Ottoman]] * [[Great Divergence]] * [[Industrial Revolution]] * [[Technology|Modern]] | list2 = * '''History of technology domains''' * [[History of biotechnology]] * [[History of communication]] * [[History of computing]] * [[History of computing hardware]] * [[Electrical engineering#History|History of electrical engineering]] * [[History of materials science]] * [[History of measurement]] * [[History of medicine]] * [[Nuclear technology#History and scientific background|History of nuclear technology]] * [[History of transport]] }}<noinclude> {{Documentation}} </noinclude> fb773a59e632323774607331b785fe0e66e18baa HistoryOfSouthAsia 0 643 1311 1310 2024-03-16T12:41:50Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:History of South Asia]] cb5a1c1e321cc478f3af3183c9b50501c7d0998c History of South Asia 0 644 1313 1312 2024-03-16T12:41:50Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Sidebar with collapsible lists | name = History of South Asia | bodyclass = plainlist | titlestyle = padding-bottom:0.5em; font-size:130%; | title = [[South Asia#History|History of South Asia]] |region = South Asia |image = [[File:South Asia (orthographic projection) without national boundaries.svg|150px|South Asia (orthographic projection)]] | listtitlestyle = background:transparent;text-align:left;padding-right:4em; | list1name = South Asian Palaeolithic | list1title = [[Outline of South Asian history|Outline]] | list1 = {{Sidebar with collapsible lists | bodyclass = plainlist | titlestyle = padding-bottom:0.5em; font-size:130%; | listtitlestyle = background:transparent;text-align:left;padding-right:4em; | list1name = South Asian Palaeolithic | list1title = [[South Asian Stone Age|Palaeolithic]] {{nobold|(2,500,000–250,000 BC)}} | list1 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Madrasian culture|Madrasian culture]]| | [[Soanian|Soanian culture]]| }} | list2name = South Asian Neolithic | list2title = [[South Asian Stone Age|Neolithic]] {{nobold|(10,800–3300 BC)}} | list2 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Bhirrana|Bhirrana culture]] | (7570–6200 BC) | [[Mehrgarh|Mehrgarh culture]] | (7000–3300 BC) | [[Edakkal Caves|Edakkal culture]] | (5000–3000 BC) }} | list3name = South Asian Copper Age | list3title = [[Chalcolithic]] {{nobold|(3500–1500 BC)}} | list3 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Anarta tradition]] | ({{Circa|3950}}–1900 BC) | [[Ahar–Banas culture|Ahar-Banas culture]] | (3000–1500 BC) | [[Pandu Rajar Dhibi|Pandu culture]] | (1600–1500 BC) | [[Malwa culture|Malwa culture]] | (1600–1300 BC) | [[Jorwe culture|Jorwe culture]] | (1400–700 BC) }} | list4name = South Asian Bronze Age | list4title = [[Bronze Age India|Bronze Age]] {{nobold|(3300–1300 BC)}} | list4 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Indus Valley Civilisation]] |(3300–1300 BC) | &nbsp;– [[Indus Valley Civilisation#Early_Harappan|Early Harappan culture]] |(3300–2600 BC) | &nbsp;– [[Indus Valley Civilisation#Mature_Harappan|Mature Harappan culture]] |(2600–1900 BC) | &nbsp;– [[Cemetery H culture|Late Harappan culture]] |(1900–1300 BC) | [[Vedic period|Vedic Civilisation]] |(2000–500 BC) | &nbsp;– [[Ochre Coloured Pottery culture]] |(2000–1600 BC) | &nbsp;– [[Gandhara grave culture|Swat culture]] |(1600–500 BC) }} | list5name = Iron Age India | list5title = [[Iron Age in India|Iron Age]] {{nobold|(1500–200 BC)}} | list5 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Vedic period|Vedic Civilisation]] |(1500–500 BC) | &nbsp;– [[Janapada]]s | (1500–600 BC) | &nbsp;– [[Black and red ware|Black and Red ware culture]] |(1300–1000 BC) | &nbsp;– [[Painted Grey Ware culture]] | (1200–600 BC) | &nbsp;– [[Northern Black Polished Ware]] | (700–200 BC) | [[Pradyota dynasty]] | (799–684 BC) | [[Haryanka dynasty]] | (684–424 BC) | [[Three Crowned Kings|Three Crowned Kingdoms]] | ({{Circa|600 BC}} – AD 1600) | [[Mahajanapadas|Maha Janapadas]] | ({{Circa|600}}–300 BC) | [[Achaemenid Empire]] | (550–330 BC) | Ror Dynasty | (450 BC – AD 489) | [[Shaishunaga dynasty]] | (424–345 BC) | [[Nanda Empire]] | (380–321 BC) | [[Macedonian Empire]] | (330–323 BC) | [[Maurya Empire]] | (321–184 BC) | [[Seleucid Empire|Seleucid India]] | (312–303 BC) | [[Sangam period]] | ({{Circa|600 BC|300 AD}}) | [[Pandya dynasty|Pandya Empire]] | ({{Circa|300 BC}} – AD 1345) | [[Chera dynasty|Chera Kingdom]] | ({{Circa|300 BC}} – AD 1102) | [[Chola dynasty|Chola Empire]] | ({{Circa|300 BC}} – AD 1279) | [[Pallava dynasty|Pallava Empire]] | ({{Circa|250 AD}} – AD 800) | [[Mahameghavahana dynasty|Maha-Megha-Vahana Empire]] | ({{Circa|250 BC|AD 500}}) | [[Parthian Empire]] | (247 BC – AD 224) }} | list6name = Middle kingdoms of India | list6title = [[Middle kingdoms of India|Middle Kingdoms]] {{nobold|(230 BC – AD 1206)}} | list6 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Satavahana dynasty|Satavahana Empire]] | (230 BC – AD 220) | [[Kuninda Kingdom]] | (200 BC – AD 300) | [[Mitra dynasty (Mathura)|Mitra Dynasty]] | ({{Circa|150|50 BC}}) | [[Shunga Empire]] | (185–73 BC) | [[Indo-Greek Kingdom]] | (180 BC – AD 10) | [[Kanva dynasty|Kanva Empire]] | (75–26 BC) | [[Indo-Scythians|Indo-Scythian Kingdom]] | (50 BC – AD 400) | [[Indo-Parthian Kingdom]] | (AD 21 – {{Circa|130}}) | [[Western Satraps|Western Satrap Empire]] | (AD 35–405 ) | [[Kushan Empire]] | (AD 60–240) | [[Nagas of Padmavati|Bharshiva Dynasty]] | (170–350) | [[Nagas of Padmavati]] | (210–340) | [[Sasanian Empire]] | (224–651) | [[Kushano-Sasanian Kingdom|Indo-Sassanid Kingdom]] | (230–360) | [[Vakataka dynasty|Vakataka Empire]] | ({{Circa|250|500}}) | [[Kalabhra dynasty|Kalabhras Empire]] | ({{Circa|250|600}}) | [[Gupta Empire]] | (280–550) | [[Kadamba dynasty|Kadamba Empire]] | (345–525) | [[Western Ganga dynasty|Western Ganga Kingdom]] | (350–1000) | [[Kamarupa|Kamarupa Kingdom]] | (350–1100) | [[Vishnukundina dynasty|Vishnukundina Empire]] | (420–624) | [[Maitraka dynasty|Maitraka Empire]] | (475–767) | [[Huna people|Huna Kingdom]] | (475–576) | [[Rai dynasty|Rai Kingdom]] | (489–632) | [[Hindu Shahis|Kabul Shahi Empire]] | ({{Circa|500}} – 1026) | [[Chalukya dynasty|Chalukya Empire]] | (543–753) | [[Maukhari dynasty|Maukhari Empire]] | ({{Circa|550|700}}) | [[Harsha|Harsha Empire]] | (606–647) | [[Tibetan Empire]] | (618–841) | [[Eastern Chalukyas|Eastern Chalukya Kingdom]] | (624–1075) | [[Rashidun Caliphate]] | (632–661) | [[Gurjara-Pratihara dynasty|Gurjara-Pratihara Empire]] | (650–1036) | [[Umayyad Caliphate]] | (661–750) | [[Mallabhum kingdom]] | (694-1947) | [[Bhauma-Kara dynasty|Bhauma-Kara Kingdom]] | (736-916) | [[Pala Empire]] | (750–1174) | [[Rashtrakuta dynasty|Rashtrakuta Empire]] | (753–982) | [[Paramara dynasty|Paramara Kingdom]] | (800–1327) | [[Seuna (Yadava) dynasty|Yadava Empire]] | (850–1334) | [[Somavamshi dynasty|Somavamshi Kingdom]] | (882–1110) | [[Chaulukya dynasty|Chaulukya Kingdom]] | (942–1244) | [[Western Chalukya Empire]] | (973–1189) | [[Lohara dynasty|Lohara Kingdom]] | (1003–1320) | [[Hoysala Empire]] | (1040–1347) | [[Sena dynasty|Sena Empire]] | (1070–1230) | [[Eastern Ganga dynasty|Eastern Ganga Empire]] | (1078–1434) | [[Kakatiya dynasty|Kakatiya Kingdom]] | (1083–1323) | [[Zamorin|Zamorin Kingdom]] | (1102–1766) | [[Kalachuris of Tripuri]] | (675-1210) | [[Kalachuris of Kalyani]] | (1156–1184) | [[Chutia Kingdom|Chutiya Kingdom]] | (1187–1673) | [[Deva dynasty|Deva Kingdom]] | ({{Circa|1200|1300}}) }} | list7name = Late medieval period | list7title = [[Medieval India|Late medieval period]] {{nobold|(1206–1526)}} | list7 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Ghaznavids|Ghaznavid Dynasty]] | (977–1186) | [[Ghurid dynasty|Ghurid Dynasty]] | (1170–1206) | [[Delhi Sultanate]] | (1206–1526) | &nbsp;– [[Mamluk dynasty (Delhi)|Mamluk Sultanate]] | (1206–1290) | &nbsp;– [[Khalji dynasty|Khalji Sultanate]] | (1290–1320) | &nbsp;– [[Tughlaq dynasty|Tughlaq Sultanate]] | (1320–1414) | &nbsp;– [[Sayyid dynasty|Sayyid Sultanate]] | (1414–1451) | &nbsp;– [[Lodi dynasty|Lodi Sultanate]] | (1451–1526) | [[Ahom kingdom|Ahom Kingdom]] | (1228–1826) | [[Nayakas of Chitradurga|Chitradurga Kingdom]] | (1300–1779) | [[Reddi Kingdom|Reddy Kingdom]] | (1325–1448) | [[Vijayanagara Empire]] | (1336–1646) | [[Bengal Sultanate]] | (1352–1576) | [[Garhwal Kingdom]] | (1358–1803) | [[Kingdom of Mysore|Mysore Kingdom]] | (1399–1947) | [[Gajapati Empire]] | (1434–1541) | [[Namgyal dynasty of Ladakh|Ladakh Kingdom ]] | (1470–1842) | [[Deccan sultanates|Deccan Sultanates]] | (1490–1596) | &nbsp;– [[Ahmadnagar Sultanate]] | (1490–1636) | &nbsp;– [[Berar Sultanate]] | (1490–1574) | &nbsp;– [[Bidar Sultanate]] | (1492–1619) | &nbsp;– [[Adil Shahi dynasty|Bijapur Sultanate]] | (1492–1686) | &nbsp;– [[Qutb Shahi dynasty|Golkonda Sultanate]] | (1518–1687) | [[Nayakas of Keladi|Keladi Kingdom]] | (1499–1763) | [[Koch dynasty|Koch Kingdom]] | (1515–1947) }} | list8name = Early modern period | list8title = [[Early modern period]] {{nobold|(1526–1858)}} | list8 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Mughal Empire]] | (1526–1858) | [[Sur Empire]] | (1540–1556) | [[Madurai Nayak dynasty|Madurai Kingdom]] | (1529–1736) | [[Thanjavur Nayak kingdom|Thanjavur Kingdom]] | (1532–1673) | [[Bhoi dynasty]] | (1541–1804) | [[Bengal Subah]] | (1576–1757) | [[Ramnad estate|Marava Kingdom]] | (1600–1750) | [[Kingdom of Sikkim|Sikkim Kingdom]] | (1642–1975) | [[Tondaiman|Thondaiman Kingdom]] | (1650–1948) | [[Maratha Empire]] | (1674–1818) | [[Misl|Sikh Confederacy]] | (1707–1799) | [[Travancore|Travancore Kingdom]] | (1729–1947) | [[Sikh Empire]] | (1799–1849) }} | list9name = Colonial India | list9title = [[Colonial India|Colonial states]] {{nobold|(1510–1961)}} | list9 = {{aligned table|leftright=y|fullwidth=y|nowrap2=y | [[Portuguese India]] | (1510–1961) | [[Dutch India]] | (1605–1825) | [[Danish India]] | (1620–1869) | [[French India]] | (1759–1954) | [[Company rule in India|Company Raj]] | (1757–1858) | [[British Raj]] | (1858–1947) }} }} | list11name = National histories | list11title = National histories | list11 = {{hlist | [[History of Afghanistan|Afghanistan]] | [[History of Bangladesh|Bangladesh]] | [[History of Bhutan|Bhutan]] | [[History of India (1947–present)|India]] | [[History of the Maldives|Maldives]] | [[History of Nepal|Nepal]] | [[History of Pakistan|Pakistan]] | [[History of Sri Lanka|Sri Lanka]] }} | list12name = Regional histories | list12title = Regional histories | list12 = {{hlist | [[History of Assam|Assam]] | [[History of Balochistan|Balochistan]] | [[History of Bengal|Bengal]] | [[History of Bihar|Bihar]] | [[History of Gujarat|Gujarat]] | [[History of Himachal Pradesh|Himachal Pradesh]] | [[History of Kabul|Kabul]] | [[History of Karnataka|Karnataka]] | [[History of Kashmir|Kashmir]] | [[History of Khyber Pakhtunkhwa|Khyber Pakhtunkhwa]] | [[History of Rajasthan|Rajasthan]] | [[History of Maharashtra|Maharashtra]] | [[History of Uttar Pradesh|Uttar Pradesh]] | [[History of Punjab|Punjab]] | [[History of Odisha|Odisha]] | [[History of Sindh|Sindh]] | [[History of South India|South India]] | [[History of Tamil Nadu|Tamil Nadu]] | [[History of Tibet|Tibet]] }} | list13name = Specialised histories | list13title = Specialised histories | list13 = {{hlist | [[History of agriculture in the Indian subcontinent|Agriculture]] | [[Architecture of India|Architecture]] | [[Coinage of India|Coinage]] | [[Demographics of India#History|Demographics]] | [[List of Indian monarchs|Dynasties]] | [[Economic history of India|Economy]] | [[History of education in the Indian subcontinent|Education]] | [[Indology]] | [[History of Indian influence on Southeast Asia|Influence on Southeast Asia]] | [[Linguistic history of India|Language]] | [[Indian literature|Literature]] | [[Indian maritime history|Maritime]] | [[History of metallurgy in the Indian subcontinent|Metallurgy]] | [[Military history of India|Military]] | [[Partition of India]] | [[Pakistan studies]] | [[Indian philosophy|Philosophy]] | [[Indian religions#History|Religion]] | [[History of science and technology in the Indian subcontinent|Science and technology]] | [[Timeline of Indian history|Timeline]] }} }}<noinclude> {{documentation |content = This template shows topics to do with the History of South Asia. [[Category:Asia history templates|South]] [[Category:Historical period templates]] }}</noinclude> 70bac7b914ceec1a68c9ab0389742639e8a55797 History of science 0 645 1315 1314 2024-03-16T12:41:51Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Navbox | name = History of science | state = {{{state|}}} | image = [[File:Johannes-kepler-tabulae-rudolphinae-google-arts-culture.jpg|80px]] | bodyclass = hlist | title = [[History of science]] | group1 = Background | list1 = * [[Sociology of the history of science|Theories and sociology]] * [[Historiography of science|Historiography]] * [[History of pseudoscience|Pseudoscience]] * [[History and philosophy of science]] | group2 = By era | list2 = * [[Science in the ancient world|Ancient world]] * [[Science in classical antiquity|Classical Antiquity]] * [[European science in the Middle Ages|Medieval European]] * [[History of science in the Renaissance|Renaissance]] * [[Scientific Revolution]] * [[Science in the Age of Enlightenment|Age of Enlightenment]] * [[Romanticism in science|Romanticism]] | group3 = By culture | list3 = * [[History of science and technology in Africa|African]] * [[History of science and technology in Argentina|Argentine]] * [[History of science and technology in Brazil|Brazilian]] * [[Byzantine science|Byzantine]] * [[History of science and technology in France|French]] * [[History of science and technology in China|Chinese]] * [[History of science and technology in the Indian subcontinent|Indian]] * [[Science in the medieval Islamic world|Medieval Islamic]] * [[History of science and technology in Japan|Japanese]] * [[History of science and technology in Korea|Korean]] * [[History of science and technology in Mexico|Mexican]] * [[History of science and technology in Russia|Russian]] * [[History of science and technology in Spain|Spanish]] | group4 = [[History of natural science|Natural sciences]] | list4 = * [[History of astronomy|Astronomy]] * [[History of biology|Biology]] * [[History of chemistry|Chemistry]] * [[Outline_of_Earth_sciences#History_of_Earth_science|Earth science]] * [[History of physics|Physics]] | group5 = [[History of mathematics|Mathematics]] | list5 = * [[History of algebra|Algebra]] * [[History of calculus|Calculus]] * [[History of combinatorics|Combinatorics]] * [[History of geometry|Geometry]] * [[History of logic|Logic]] * [[History of probability|Probability]] * [[History of statistics|Statistics]] * [[History of trigonometry|Trigonometry]] | group6 = [[History of the social sciences|Social sciences]] | list6 = * [[History of anthropology|Anthropology]] * [[History of archaeology|Archaeology]] * [[History of economic thought|Economics]] * [[History]] * [[History of political science|Political science]] * [[History of psychology|Psychology]] * [[History of sociology|Sociology]] | group7 = [[History of technology|Technology]] | list7 = * [[History of agricultural science|Agricultural science]] * [[History of computer science|Computer science]] * [[History of materials science|Materials science]] * [[History of engineering|Engineering]] | group8 = [[History of medicine|Medicine]] | list8 = * [[History of medicine|Human medicine]] * [[History of veterinary medicine|Veterinary medicine]] * [[History of anatomy|Anatomy]] * [[History of neuroscience|Neuroscience]] * [[History of neurology and neurosurgery |Neurology and neurosurgery ]] * [[History of nutrition|Nutrition]] * [[History of pathology|Pathology]] * [[History of pharmacy|Pharmacy]] | belowclass = hlist | belowstyle = margin-right:0.5em;<!--(see liststyle)--> padding:0.1em 0 0.4em;line-height:1.7em; | below = * {{icon|List}} [[List of timelines#Science|Timelines]] * {{nowrap|{{icon|Portal}} [[Portal:History of science|Portal]]}} * {{nowrap|{{icon|Category}} [[:Category:History of science|Category]]}} }}<noinclude> {{documentation|content= {{collapsible option}} [[Category:History of science templates| ]] }} </noinclude> f86c98c3942cd528eb7bbb61c5dee54992c5fef1 Indianscience 0 646 1317 1316 2024-03-16T12:41:51Z Motzoid India 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Science in India]] 17fab60a4ce0452508f0e6e0c947846841d8ea9e Science in India 0 647 1319 1318 2024-03-16T12:41:52Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Navbox |name = Science in India |title = [[Science and technology in India]] |state = {{{state|autocollapse}}} |bodyclass = hlist |group1 = |list1 = * [[Architecture of India|Architecture]] * [[Indian astronomy|Astronomy]] * [[Cartography of India|Cartography]] * [[Indian coinage|Coinage]] * [[Indian logic|Logic]] * [[Indian mathematics|Mathematics]] * [[Indian national calendar|National calendar]] * [[Engineering in India|Engineering]] |group2 = [[History of science and technology in the Indian subcontinent|History]] |list2 = * [[List of Indian inventions and discoveries|Inventions and discoveries]] * [[Indian maritime history|Maritime history]] * [[Military history of India|Military]] * [[History of measurement systems in India|Measurement systems]] * [[History of metallurgy in the Indian subcontinent|Metallurgy]] |group3 = [[Education in India|Education]] |list3 = * [[Higher education in India|Higher education]] * [[:Category:Research institutes in India|Research institutes]] ** [[Supercomputing in India|Supercomputing]] * [[:Category:Science museums in India|Science museums]] |group4 = Sectors |list4 = * [[Automotive industry in India|Auto]] * [[Biotechnology in India|Biotechnology]] * [[Chemical industry in India|Chemical]] * [[High-speed rail in India|High-speed rail]] * [[Information technology in India|IT]] ** [[:Category:Software companies of India|Software]] * [[Nuclear power in India|Nuclear power]] ** [[:Category:Nuclear technology in India|Technology]] * [[Pharmaceutical industry in India|Pharmaceuticals]] * [[Renewable energy in India|Renewable energy]] * [[Telecommunications in India|Telecommunications]] ** [[Mobile network operators of India|4G]] |group5 = People |list5 = * [[:Category:Indian engineers|Engineers]] * [[:Category:Indian inventors|Inventors]] * [[:Category:Indian Nobel laureates|Nobel laureates]] * [[:Category:Indian science writers|Science writers]] * [[:Category:Indian scientists|Scientists]] * [[:Category:Indian technology writers|Technology writers]] |group6 = Institutes and programs |list6 = * [[Ministry of Science and Technology (India)|Ministry of Science and Technology]] * [[National Centre for Polar and Ocean Research]] * [[Indian Space Research Organisation|ISRO]] * [[Defence Research and Development Organisation|DRDO]] * [[Council of Scientific and Industrial Research]] |below = * '''{{icon|category}} [[:Category:Science and technology in India|Category]]''' * '''{{Icon|Commons}} [[commons:Category:Science and technology in India|Commons]]''' }}<noinclude> {{collapsible option}} [[Category:India templates]] </noinclude> 0204cb8854d20255a420fb0d1150326209b66bf3 Side box/styles.css 0 648 1321 1320 2024-03-16T12:41:52Z Motzoid India 2 1 revision imported text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Science and technology in India 0 649 1323 1322 2024-03-16T12:41:52Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Sidebar |name = Science and technology in India |bodystyle = width: {{{width|18.0em}}}; border: 1px solid #aabaaa; |basestyle = background: #cb4154; |topimage = [[File:Details_of_the_top_of_iron_pillar,_Qutub_Minar,_Delhi.jpg|100px|alt=The Iron Pillar of Delhi.]] |title = [[History of science and technology in India|{{color|white|History of science and<br />technology in the <br />Indian subcontinent}}]] |headingstyle = padding-top: 0; color: white; |contentclass = hlist |contentstyle = padding-top: 0.2em; |content1 = * [[List of Indian inventions and discoveries|Inventions]] * [[Science and technology in India|Science in India]] * [[Science and technology in Bangladesh|Science in Bangladesh]] * [[Science and technology in Pakistan|Science in Pakistan]] |heading2 = By subject |content2 = * [[Indian mathematics|Mathematics]] * [[Indian astronomy|Astronomy]] * [[Indian national calendar|Calendar]] * [[History of measurement systems in India|Measurement systems]] ** [[Indian units of measurement|Units of measurement]] * [[Cartography of India|Cartography]] * [[Indian geography|Geography]] * [[History_of_printing#In_India|Printing]] * [[History of metallurgy in the Indian subcontinent|Metallurgy]] * [[Indian coinage|Coinage]] * [[History of metallurgy in the Indian subcontinent|Indian Alchemy]] * [[Ayurveda|Traditional medicine]] * [[History of agriculture in India|Agriculture]] * [[History of education in the Indian subcontinent|Education]] * [[Indian architecture|Architecture]] ** [[List of bridges in India|Bridges]] * [[Transport in India|Transport]] ** [[Indian maritime history|Maritime history]] ** [[Naval history of India|Navigation]] * [[Military history of India|Military]] }}<noinclude> [[Category:India history templates]] [[Category:India science and nature templates]] [[Category:India sidebar templates]] [[Category:Technology and applied science sidebar templates|India]] </noinclude> 391ed08e7760ac115ac7f6062f73b94d7eeef463 Plainlist/styles.css 0 651 1327 1326 2024-03-16T12:41:53Z Motzoid India 2 1 revision imported text text/plain /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Hlist/styles.css 0 652 1329 1328 2024-03-16T12:41:53Z Motzoid India 2 1 revision imported text text/plain /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 South Asian topics 0 653 1331 1330 2024-03-16T12:41:54Z Motzoid India 2 1 revision imported wikitext text/x-wiki {{Navbox | name = South Asian topics | state = {{{state<includeonly>|autocollapse</includeonly>}}} | title = [[South Asia|South Asian topics]] | image = [[File:South Asia (orthographic projection).svg|80px|link=South Asia|alt=]] | listclass = hlist | group1 = [[:Category:South Asian countries|Countries and regions]] | list1 = * [[Afghanistan]] * [[Bangladesh]] * [[Bhutan]] * [[India]] ** [[North India|North]] ** [[South India|South]] ** [[Northeast India|Northeast]] ** [[List of islands in India|Islands]] * [[Maldives]] * [[Nepal]] * [[Pakistan]] ** [[Punjab, Pakistan|Punjab]] * [[Sri Lanka]] * [[South Asia#Regions|South Asian regions]] ** [[Northwestern South Asia|Northwestern]] ** [[Northern South Asia|Northern]] ** [[Eastern South Asia|Eastern]] ** [[Southern South Asia|Southern]] * [[:Template:GeoSouthAsia |General geography]] | group2 = [[South Asian ethnic groups|Ethnic groups]] | list2 = * [[Andamanese peoples|Andamanese]] * [[Austroasiatic peoples of South Asia|Austroasiatic]] * [[South_Asian_ethnic_groups#Austronesian_people|Austronesian]] * [[Dravidian peoples|Dravidian]] * [[Indo-Aryan peoples|Indo-Aryan]] * [[South_Asian_ethnic_groups#Iranic_people|Iranic]] * [[South_Asian_ethnic_groups#Semitic_people|Semitic]] * [[Nuristani peoples|Nuristani]] * [[Turkic peoples|Turkic]] * Other groups ** [[Afro-Asians in South Asia|Afro-Asians]] ** [[South_Asian_ethnic_groups#Chinese|Chinese]] ** [[South_Asian_ethnic_groups#European_and_Eurasian_people|European and Eurasian]] * [[South Asian diaspora|Diaspora]] | group3 = [[Culture of South Asia|Culture]] | list3 = * [[:Category:South Asian architecture‎|Architecture‎]] * [[Indian art|Art]] * [[South Asian cinema|Cinema]] * [[South Asian cuisine|Cuisine]] * [[Greater India|Cultural sphere]] * [[Template:Clothing_in_South_Asia|Fashion]] * [[Languages of South Asia|Languages]] * [[South Asian literature|Literature]] * [[:Category:South_Asian_music|Music]] * [[:Category:South Asian mythology‎|Mythology]] * [[:Category:South Asian philosophy|Philosophy]] * [[Brahmic scripts|Scripts]] * [[:Category:Surnames of South Asian origin|Surnames]] | group4 = [[:Category:Environment of South Asia|Environment]] | list4 = * [[South Asian Monsoon|Monsoon]] * [[Climate change in South Asia|Climate change]] | group5 = [[Economy of South Asia|Economy]] and [[:Category:Politics of South Asia|Politics]] | list5 = * [[Human rights in South Asia]] * [[Religious nationalism]] ** [[Hindutva|Hindu]] ** [[Muslim nationalism in South Asia|Muslim]] ** [[Khalistan movement|Sikh]] * [[List_of_Asian_stock_exchanges#Southern_Asia|Stock exchanges]] * [[Caste#In South Asia|Caste system]] | group6 = [[History of South Asia|History]] | list6 = * [[:Category:Archaeology of South Asia|Archaeology]] ** [[:Category:Archaeological cultures of South Asia|Archaeological cultures]] * [[South Asian Bronze Age|Bronze Age]] * [[Vedic period|Iron Age]] * [[Middle kingdoms of India|Middle kingdoms]] * [[Medieval India|Medieval]] * [[India#Early_modern_India|Early modern]] * [[Colonial India|Colonial era]] * [[South Asia#Contemporary era|Modern era]] * [[:Category:Former countries in South Asia|Former countries]] | group7 = [[Religion in South Asia|Religion]] | list7 = * [[Dharmic religions|Dharmic]] ** [[Hinduism in South Asia|Hinduism]] ** [[Sikhism]] * [[Islam in South Asia|Islam]] * [[Religious discrimination|Religious persecution]] ** [[Freedom_of_religion_in_Bangladesh#Persecution|Bangladesh]] ** [[Religious_violence_in_India#Modern_India|India]] ** [[Religious_discrimination_in_Pakistan|Pakistan]] | group8 = [[Sport in South Asia|Sports]] | list8 = * [[Cricket at the South Asian Games|Cricket]] * [[South Asian Football Federation]] * [[South Asian Games]] * [[Traditional games of South Asia|Traditional games]] * [[Indian martial arts|South Asian martial arts]] | group9 = [[:Category:Education in South Asia|Education]] | list9 = * [[South Asian studies]] | group10 = Military | list10 = * [[Indo-Pakistani wars and conflicts|Indo-Pakistani conflicts]] * [[Sino-Indian border dispute]] * [[Afghanistan–Pakistan border skirmishes|Afghanistan–Pakistan skirmishes]] | group11 = [[History of science and technology in the Indian subcontinent|Science and technology]] | list11 = * [[Indian Institutes of Technology]] * [[List of Indian inventions and discoveries|Inventions and discoveries]] * [[History of science and technology in the Indian subcontinent|History]] * [[:Category:South_Asian_swords|Swords]] * [[:Category:South Asian traditional medicine|Traditional medicine]] }}<noinclude> {{collapsible option}} [[Category:Asia region templates]] [[Category:South Asia|*]] </noinclude> 0ca6f3a0765626bc94b208aa99c508a5b22d39bb Science and technology in ancient India 0 654 1332 2024-03-16T12:43:37Z Motzoid India 2 fd wikitext text/x-wiki The '''history of science and technology on the Indian subcontinent''' begins with the prehistoric human activity of the Indus Valley Civilisation to the early Indian states and empires. == Prehistory == See also: List of Indian inventions and discoveries By 5500 BCE a number of sites similar to Mehrgarh (modern-day Pakistan) had appeared, forming the basis of later chalcolithic cultures. The inhabitants of these sites maintained trading relations with Central Asia and the Near East. Irrigation was developed in the Indus Valley Civilization by around 4500 BCE. The size and prosperity of the Indus civilization grew as a result of this innovation, which eventually led to more planned settlements making use of drainage and sewerage. Sophisticated irrigation and water storage systems were developed by the Indus Valley Civilization, including artificial reservoirs at Girnar dated to 3000 BCE, and an early canal irrigation system from c. 2600 BCE. Cotton was cultivated in the region by the 5th–4th millennia BCE. Sugarcane was originally from tropical South and Southeast Asia. Different species likely originated in different locations with ''S. barberi'' originating in India, and ''S. edule'' and ''S. officinarum'' coming from New Guinea.The inhabitants of the Indus valley developed a system of standardization, using weights and measures, evident by the excavations made at the Indus valley sites. This technical standardization enabled gauging devices to be effectively used in angular measurement and measurement for construction. Calibration was also found in measuring devices along with multiple subdivisions in case of some devices. One of the earliest known docks is at Lothal (2400 BCE), located away from the main current to avoid deposition of silt. Modern oceanographers have observed that the Harappans must have possessed knowledge relating to tides in order to build such a dock on the ever-shifting course of the Sabarmati, as well as exemplary hydrography and maritime engineering. Excavations at Balakot (Kot Bala) (c. 2500–1900 BCE), modern day Pakistan, have yielded evidence of an early furnace. The furnace was most likely used for the manufacturing of ceramic objects. Ovens, dating back to the civilization's mature phase (c. 2500–1900 BCE), were also excavated at Balakot. The Kalibangan archeological site further yields evidence of potshaped hearths, which at one site have been found both on ground and underground. Kilns with fire and kiln chambers have also been found at the Kalibangan site. Based on archaeological and textual evidence, Joseph E. Schwartzberg (2008)—a University of Minnesota professor emeritus of geography—traces the origins of Indian cartography to the Indus Valley Civilization (c. 2500–1900 BCE). The use of large scale constructional plans, cosmological drawings, and cartographic material was known in South Asia with some regularity since the Vedic period (2nd – 1st millennium BCE). Climatic conditions were responsible for the destruction of most of the evidence, however, a number of excavated surveying instruments and measuring rods have yielded convincing evidence of early cartographic activity. Schwartzberg (2008)—on the subject of surviving maps—further holds that: 'Though not numerous, a number of map-like graffiti appear among the thousands of Stone Age Indian cave paintings; and at least one complex Mesolithic diagram is believed to be a representation of the cosmos.' Archeological evidence of an animal-drawn plough dates back to 2500 BCE in the Indus Valley Civilization. The earliest available swords of copper discovered from the Harappan sites date back to 2300 BCE. Swords have been recovered in archaeological findings throughout the Ganges–Jamuna Doab region of India, consisting of bronze but more commonly copper. edef9cab44995d9264767e225d8cd06812b43709 User:Motzoid India 2 655 1333 2024-03-16T12:49:47Z Motzoid India 2 Redirected page to [[Motzoid India]] wikitext text/x-wiki #REDIRECT [[Motzoid India]] 079863689c6aac9964d646a415ef4a8830b992ab Dadaji 0 656 1334 2024-03-16T12:50:29Z Motzoid India 2 Redirected page to [[Pandurang Shastri Athavale]] wikitext text/x-wiki #REDIRECT [[Pandurang Shastri Athavale]] fbba37f713d268371a358d92fff0179abb8443ff Meluhha 0 657 1335 2024-03-16T12:51:32Z Motzoid India 2 Created page with "'''''Meluḫḫa''''' or '''''Melukhkha''''' (Sumerian: 𒈨𒈛𒄩𒆠 ''Me-luḫ-ḫa<sup>KI</sup>'') is the Sumerian name of a prominent trading partner of Sumer during the Middle Bronze Age. Its identification remains an open question, but most scholars associate it with the Indus Valley civilisation. == Etymology[edit] == Asko Parpola identifies Proto-Dravidians with the Harappan Culture and the Meluhhan people mentioned in Sumerian records. In his book ''Decipher..." wikitext text/x-wiki '''''Meluḫḫa''''' or '''''Melukhkha''''' (Sumerian: 𒈨𒈛𒄩𒆠 ''Me-luḫ-ḫa<sup>KI</sup>'') is the Sumerian name of a prominent trading partner of Sumer during the Middle Bronze Age. Its identification remains an open question, but most scholars associate it with the Indus Valley civilisation. == Etymology[edit] == Asko Parpola identifies Proto-Dravidians with the Harappan Culture and the Meluhhan people mentioned in Sumerian records. In his book ''Deciphering the Indus Script.'' Parpola states that the Brahui people of Pakistan are remnants of the Harappan culture. According to him, the word "Meluhha" derives from the Dravidian words ''mel'' ("elevated") and ''akam'' ("place"). It is believed that the Harappans exported sesame oil to Mesopotamia, where it was known as ''ilu'' in Sumerian and ''eḷḷu'' in Akkadian. One theory is that these words derive from the South Dravidian I name for sesame (''eḷḷ'' or ''eḷḷu''). However, Michael Witzel, who associates IVC with the ancestors of Munda speakers, suggests an alternative etymology from the para-Munda word for wild sesame: ''jar-tila''.<sup>[''clarification needed'']</sup> Munda is an Austroasiatic language, and forms a substratum (including loanwords) in Dravidian languages. Asko Parpola relates Meluhha with Mleccha who were considered non-Vedic "barbarians" in Vedic Sanskrit. 8bf9549124c096a397a3a71b47749797dca8ff37 Gupta Empire 0 658 1336 2024-03-16T13:36:41Z Motzoid India 2 Created page with "The '''Gupta Empire''' was an ancient Indian empire which existed from the early 4th century CE to early 6th century CE. At its zenith, from approximately 319 to 467 CE, it covered much of the Indian subcontinent. This period has been considered as the Golden Age of India by some historians,although this characterisation has been disputed by other historians. The ruling dynasty of the empire was founded by Gupta, and the most notable rulers of the dynasty were Chandragup..." wikitext text/x-wiki The '''Gupta Empire''' was an ancient Indian empire which existed from the early 4th century CE to early 6th century CE. At its zenith, from approximately 319 to 467 CE, it covered much of the Indian subcontinent. This period has been considered as the Golden Age of India by some historians,although this characterisation has been disputed by other historians. The ruling dynasty of the empire was founded by Gupta, and the most notable rulers of the dynasty were Chandragupta I, Samudragupta, Chandragupta IIand Skandagupta. The 5th-century <small>CE</small> Sanskrit poet Kalidasa credits the Guptas with having conquered about twenty-one kingdoms, both in and outside India, including the kingdoms of Parasikas, the Hunas, the Kambojas, tribes located in the west and east Oxus valleys, the Kinnaras, Kiratas, and others. The high points of this period are the great cultural developments which took place primarily during the reigns of Samudragupta, Chandragupta II and Kumaragupta I. Many Hindu epics and literarysources, such as Mahabharataand Ramayana, were canonised during this period. The Gupta period produced scholars such as Kalidasa, Aryabhata, Varahamihira and Vatsyayana, who made great advancements in many academic fields. Science and political administration reached new heights during the Gupta era. The period, sometimes described as ''Pax Gupta'', gave rise to achievements in architecture, sculpture, and painting that "set standards of form and taste [that] determined the whole subsequent course of art, not only in India but far beyond her borders". Strong trade ties also made the region an important cultural centre and established the region as a base that would influence nearby kingdoms and regions in India and Southeast Asia.<sup>[''unreliable source?'']</sup> The Puranas, earlier long poems on a variety of subjects, are also thought to have been committed to written texts around this period. Hinduism was followed by the rulers and the Brahmins flourished in the Gupta empire but the Guptas tolerated people of other faiths as well. The empire eventually died out because of factors such as substantial loss of territory and imperial authority caused by their own erstwhile feudatories, as well as the invasion by the Huna peoples (Kidarites and Alchon Huns) from Central Asia.After the collapse of the Gupta Empire in the 6th century, India was again ruled by numerous regional kingdoms. == Origin == Main article: Origin of the Gupta dynasty The homeland of the Guptas is uncertain. According to one theory, they originated in the present-day lower-Doab region of Bihar and Uttar Pradesh, where most of the inscriptions and coin hoards of the early Gupta kings have been discovered. This theory is also supported by the Purana, as argued by the proponents, that mention the territory of the early Gupta kings as Prayaga, Saketa, and Magadhaareas in the Ganges basin. Another prominent theory locates the Gupta homeland in the present-day Bengal region in Ganges basin, based on the account of the 7th-century Chinese Buddhist monk Yijing. According to Yijing, king Che-li-ki-to (identified with the dynasty's founder ''Shri'' Gupta) built a temple for Chinese pilgrims near Mi-li-kia-si-kia-po-no (apparently a transcription of Mriga-shikha-vana). Yijing states that this temple was located more than 40 ''yojanas'' east of Nalanda, which would mean it was situated somewhere in the modern Bengal region. Another proposal is that the early Gupta kingdom extended from Prayaga in the west to northern Bengal in the east. The Gupta records do not mention the dynasty's varna (social class). Some historians, such as A.S. Altekar, have theorised that they were of Vaishya origin, as certain ancient Indian texts prescribe the name "Gupta" for the members of the Vaishya varna. According to historian R. S. Sharma, the Vaishyas – who were traditionally associated with trade – may have become rulers after resisting oppressive taxation by the previous rulers. Critics of the Vaishya-origin theory point out that the suffix Gupta features in the names of several non-Vaishyas before as well as during the Gupta period, and the dynastic name "Gupta" may have simply derived from the name of the family's first king Gupta. Some scholars, such as S. R. Goyal, theorise that the Guptas were Brahmanas, because they had matrimonial relations with Brahmans, but others reject this evidence as inconclusive. Based on the Pune and Riddhapur inscriptions of the Gupta princess Prabhavati-gupta, some scholars believe that the name of her paternal gotra (clan) was "Dharana", but an alternative reading of these inscriptions suggests that Dharana was the ''gotra'' of her mother Kuberanaga. == History == Gupta (Gupta script:  ''gu-pta'', fl. late 3rd century CE) is the earliest known king of the dynasty: different historians variously date the beginning of his reign from mid-to-late 3rd century CE. Gupta founded the Gupta Empire <abbr>c.</abbr> 240-280 CE, and was succeeded by his son, Ghatotkacha, <abbr>c.</abbr> 280-319 CE, followed by Ghatotkacha's son, Chandragupta I, <abbr>c.</abbr> 319-335 CE. "Che-li-ki-to", the name of a king mentioned by the 7th century Chinese Buddhist monk Yijing, is believed to be a transcription of "Shri-Gupta" (IAST: Śrigupta), "Shri" being an honorific prefix. According to Yijing, this king built a temple for Chinese Buddhist pilgrims near "Mi-li-kia-si-kia-po-no" (believed to be a transcription of Mṛgaśikhāvana). In the Allahabad Pillar inscription, Gupta and his successor Ghatotkacha are described as ''Maharaja'' ("great king"), while the next king Chandragupta I is called a ''Maharajadhiraja'' ("king of great kings"). In the later period, the title ''Maharaja'' was used by feudatory rulers, which has led to suggestions that Gupta and Ghatotkacha were vassals (possibly of Kushan Empire).However, there are several instances of paramount sovereigns using the title ''Maharaja'', in both pre-Gupta and post-Gupta periods, so this cannot be said with certainty. That said, there is no doubt that Gupta and Ghatotkacha held a lower status and were less powerful than Chandragupta I. Chandragupta I married the Licchavi princess Kumaradevi, which may have helped him extend his political power and dominions, enabling him to adopt the imperial title ''Maharajadhiraja''. According to the dynasty's official records, he was succeeded by his son Samudragupta. However, the discovery of the coins issued by a Gupta ruler named Kachahave led to some debate on this topic: according to one theory, Kacha was another name for Samudragupta; another possibility is that Kacha was a rival claimant to the throne. === Samudragupta === See also: Samudragupta and Gupta conquests of Bengal Samudragupta succeeded his father around 335 or 350 CE, and ruled until <abbr>c.</abbr> 375 CE. The Allahabad Pillar inscription, composed by his courtier Harishena, credits him with extensive conquests. The inscription asserts that Samudragupta uprooted 8 kings of Āryāvarta, the northern region, including the Nagas. It further claims that he subjugated all the kings of the forest region, which was most probably located in central India. It also credits him with defeating 12 rulers of Dakshinapatha, the southern region: the exact identification of several of these kings is debated among modern scholars, but it is clear that these kings ruled areas located on the eastern coast of India.The inscription suggests that Samudragupta advanced as far as the Pallava kingdom in the south, and defeated Vishnugopa, the Pallava regent of Kanchi. During this southern campaign, Samudragupta most probably passed through the forest tract of central India, reached the eastern coast in present-day Odisha, and then marched south along the coast of the Bay of Bengal. Evolution of Gupta territory, with neighbouring polities The Allahabad Pillar inscription mentions that rulers of several frontier kingdoms and tribal oligarchiespaid Samudragupta tributes, obeyed his orders, and performed obeisance before him. The frontier kingdoms included Samatata, Davaka, Kamarupa, Nepala and Karttripura. The tribal oligarchies included Malavas, Arjunayanas, Yaudheyas, Madrakas, and Abhiras, among others. Finally, the inscription mentions that several foreign kings tried to please Samudragupta by personal attendance; offered him their daughters in marriage (or according to another interpretation, gifted him maidens); and sought the use of the Garuda-depicting Gupta seal for administering their own territories.This is an exaggeration: for example, the inscription lists the king of Simhala among these kings. It is known that from Chinese sources that the Simhala king Meghavarna sent rich presents to the Gupta king requesting his permission to build a Buddhist monastery at Bodh Gaya: Samudragupta's panegyrist appears to have described this act of diplomacy as an act of subservience. Samudragupta appears to have been Vaishnavite, as attested by his Eran inscription, and performed several Brahmanicalceremonies. The Gupta records credit him with making generous donations of cows and gold. He performed the Ashvamedha ritual (horse sacrifice), which was used by the ancient Indian kings to prove their imperial sovereignty, and issued gold coins (see Coinage below) to mark this performance. The Allahabad Pillar inscription presents Samudragupta as a wise king and strict administrator, who was also compassionate enough to help the poor and the helpless. It also alludes to the king's talents as a musician and a poet, and calls him the "king of poets". Such claims are corroborated by Samudragupta's gold coins, which depict him playing a veena. Samudragupta appears to have directly controlled a large part of the Indo-Gangetic Plain in present-day India, as well as a substantial part of central India. Besides, his empire comprised a number of monarchical and tribal tributary states of northern India, and of the south-eastern coastal region of India. === Ramagupta === Main article: Ramagupta Ramagupta is known from a sixth-century play, the ''Devichandragupta'', in which he surrenders his wife to the enemy Sakas and his brother Chandragupta has to sneak into the enemy camp to rescue her and kill the Saka king. The historicity of these events is unclear, but Ramagupta's existence is confirmed by three Jain statues found at Durjanpur, with inscriptions referring to him as the ''Maharajadhiraja''. A large number of his copper coins also have been found from the Eran-Vidisha region and classified in five distinct types, which include the ''Garuda'', ''Garudadhvaja'', ''lion'' and ''border legend''types. The Brahmi legends on these coins are written in the early Gupta style. === Chandragupta II "Vikramaditya" === Main article: Chandragupta II See also: Gupta conquests of Bengal According to the Gupta records, amongst his sons, Samudragupta nominated prince Chandragupta II, born of queen Dattadevi, as his successor. Chandragupta II, ''Vikramaditya''(Victory of the Sun), ruled from 375 until 415. He married a Kadamba princess of Kuntala and of Naga lineage (''Nāgakulotpannnā''), Kuberanaga. His daughter Prabhavatiguptafrom this Naga queen was married to Rudrasena II, the Vakatakaruler of Deccan. His son Kumaragupta I was married to a Kadamba princess of the Karnataka region. Chandragupta II expanded his realm westwards, defeating the Saka Western Kshatrapas of Malwa, Gujarat and Saurashtra in a campaign lasting until 409. His main opponent Rudrasimha III was defeated by 395, and he crushed the Bengal chiefdoms. This extended his control from coast to coast, established a second capital at Ujjain and was the high point of the empire.<sup>[''citation needed'']</sup> Kuntala inscriptions indicate rule of Chandragupta in Kuntala region of Indian state of Karnataka. Hunza inscription also indicate that Chandragupta was able to rule north western Indian subcontinent and proceeded to conquer Balkh, although some scholars have also disputed the identity of gupta king. Chalukyan ruler Vikramditya VI (r. 1076 – 1126 CE) mentions Chandragupta with his title and states"why should the glory of the Kings Vikramaditya and Nanda be a hindrance any longer ? he with a loud command abolished that (era), which has the name of Saka, and made that (era) which has the Chalukya counting". Despite the creation of the empire through war, the reign is remembered for its very influential style of Hindu art, literature, culture and science, especially during the reign of Chandragupta II. Some excellent works of Hindu art such as the panels at the Dashavatara Temple in Deogarh serve to illustrate the magnificence of Gupta art. Above all, it was the synthesis of elements that gave Gupta art its distinctive flavour. During this period, the Guptas were supportive of thriving Buddhist and Jaincultures as well, and for this reason, there is also a long history of non-Hindu Gupta period art. In particular, Gupta period Buddhist art was to be influential in most of East and Southeast Asia. Many advances were recorded by the Chinese scholar and traveller Faxian in his diary and published afterwards. The court of Chandragupta was made even more illustrious by the fact that it was graced by the ''Navaratna'' (Nine Jewels), a group of nine who excelled in the literary arts. Amongst these men was Kālidāsa, whose works dwarfed the works of many other literary geniuses, not only in his own age but in the years to come. Kalidasa was mainly known for his subtle exploitation of the ''shringara'' (romantic) element in his verse. ==== Chandragupta II's campaigns against foreign tribes ==== The 4th century Sanskrit poet Kalidasa credits Chandragupta Vikramaditya with conquering about twenty-one kingdoms, both in and outside India. After finishing his campaign in East and West India, Vikramaditya (Chandragupta II) proceeded northwards, subjugated the Parasikas, then the Hunas and the Kambojas tribes located in the west and east Oxus valleys respectively. Thereafter, the king proceeded into the Himalaya mountains to reduce the mountain tribes of the Kinnaras, Kiratas, as well as India proper.<sup>[''non-primary source needed'']</sup> In one of his works Kalidasa also credits him with the removal of the Sakas from the country. He wrote 'Wasn't it Vikramaditya who drove the Sakas out from the lovely city of Ujjain?'. The ''Brihatkathamanjari'' of the Kashmiri writer Kshemendrastates, King Vikramaditya (Chandragupta II) had "unburdened the sacred earth of the Barbarians like the Sakas, Mlecchas, Kambojas, Yavanas, Tusharas, Parasikas, Hunas, and others, by annihilating these sinful Mlecchas completely".<sup>[''non-primary source needed''][''unreliable source?'']</sup> ==== Faxian ==== Faxian, a Chinese Buddhist, was one of the pilgrims who visited India during the reign of the Gupta emperor Chandragupta II. He started his journey from China in 399 <small>CE</small> and reached India in 405 <small>CE</small>. During his stay in India up to 411 <small>CE</small>, he went on a pilgrimage to Mathura, Kannauj, Kapilavastu, Kushinagar, Vaishali, Pataliputra, Kashi, and Rajagriha, and made careful observations about the empire's conditions. Faxian was pleased with the mildness of administration. The Penal Code was mild, and offences were punished by fines only. From his accounts, the Gupta Empire was a prosperous period. His writings form one of the most important sources for the history of this period. Faxian on reaching Mathura comments––<blockquote>"The snow and heat are finely tempered, and there is neither hoarfrost nor snow. The people are numerous and happy. They have not to register their households. Only those who cultivate the royal land have to pay (a portion of) the gain from it. If they want to go, they go. If they want to stay on, they stay on. The king governs without decapitation or (other) corporal punishments. Criminals are simply fined according to circumstances. Even in cases of repeated attempts at wicked rebellion, they only have their right-hand cut off. The king's bodyguards & attendants all have salaries. Throughout the whole country, the people do not kill any living creature, not drink any intoxicating liquor, nor eat onions or garlic."</blockquote> === Kumaragupta I === Main article: Kumaragupta I Chandragupta II was succeeded by his second son Kumaragupta I, born of ''Mahadevi'' Dhruvasvamini. Kumaragupta I assumed the title, ''Mahendraditya''. He ruled until 455. Towards the end of his reign a tribe in the Narmada valley, the Pushyamitras, rose in power to threaten the empire. The Kidarites as well probably confronted the Gupta Empire towards the end of the rule of Kumaragupta I, as his son Skandaguptamentions in the Bhitari pillar inscription his efforts at reshaping a country in disarray, through reorganisation and military victories over the Pushyamitras and the Hunas. He was the founder of Nalanda University which on 15 July 2016 was declared as a UNESCO world heritage site.Kumaragupta I was also a worshipper of Kartikeya. a0b6bb42c9fcd167cb168cb7f8e66d9b3115f660 1337 1336 2024-03-16T13:39:45Z Motzoid India 2 wikitext text/x-wiki <div style="float: right; margin-left: 15px; border: 1px solid #aaa; padding: 5px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Gupta Empire''' |- ! colspan="2" style="text-align:center; font-size: 110%;" | Gupta Empire |- | colspan="2" style="text-align:center;" | [[File:Gupta_Empire_map.png|250px|alt=Map of Gupta Empire|Map of Gupta Empire]] |- ! Established | c. 320 CE |- ! Disestablished | c. 550 CE |- ! Capital | Pataliputra |- ! Government | Monarchy |- ! Religion | Hinduism, Buddhism |- ! Language | Sanskrit |- ! Currency | Gold coins (Dinar), Silver coins (Rupaka) |- ! Area | ~5 million km² |- ! Major cities | Pataliputra, Ayodhya, Varanasi |- ! Founder | Sri Gupta |- ! Successor | Later Gupta dynasty |- ! Key Figures | Chandragupta I, Samudragupta, Chandragupta II |} </div> The '''Gupta Empire''' was an ancient Indian empire which existed from the early 4th century CE to early 6th century CE. At its zenith, from approximately 319 to 467 CE, it covered much of the Indian subcontinent. This period has been considered as the Golden Age of India by some historians,although this characterisation has been disputed by other historians. The ruling dynasty of the empire was founded by Gupta, and the most notable rulers of the dynasty were Chandragupta I, Samudragupta, Chandragupta IIand Skandagupta. The 5th-century <small>CE</small> Sanskrit poet Kalidasa credits the Guptas with having conquered about twenty-one kingdoms, both in and outside India, including the kingdoms of Parasikas, the Hunas, the Kambojas, tribes located in the west and east Oxus valleys, the Kinnaras, Kiratas, and others. The high points of this period are the great cultural developments which took place primarily during the reigns of Samudragupta, Chandragupta II and Kumaragupta I. Many Hindu epics and literarysources, such as Mahabharataand Ramayana, were canonised during this period. The Gupta period produced scholars such as Kalidasa, Aryabhata, Varahamihira and Vatsyayana, who made great advancements in many academic fields. Science and political administration reached new heights during the Gupta era. The period, sometimes described as ''Pax Gupta'', gave rise to achievements in architecture, sculpture, and painting that "set standards of form and taste [that] determined the whole subsequent course of art, not only in India but far beyond her borders". Strong trade ties also made the region an important cultural centre and established the region as a base that would influence nearby kingdoms and regions in India and Southeast Asia.<sup>[''unreliable source?'']</sup> The Puranas, earlier long poems on a variety of subjects, are also thought to have been committed to written texts around this period. Hinduism was followed by the rulers and the Brahmins flourished in the Gupta empire but the Guptas tolerated people of other faiths as well. The empire eventually died out because of factors such as substantial loss of territory and imperial authority caused by their own erstwhile feudatories, as well as the invasion by the Huna peoples (Kidarites and Alchon Huns) from Central Asia.After the collapse of the Gupta Empire in the 6th century, India was again ruled by numerous regional kingdoms. == Origin == Main article: Origin of the Gupta dynasty The homeland of the Guptas is uncertain. According to one theory, they originated in the present-day lower-Doab region of Bihar and Uttar Pradesh, where most of the inscriptions and coin hoards of the early Gupta kings have been discovered. This theory is also supported by the Purana, as argued by the proponents, that mention the territory of the early Gupta kings as Prayaga, Saketa, and Magadhaareas in the Ganges basin. Another prominent theory locates the Gupta homeland in the present-day Bengal region in Ganges basin, based on the account of the 7th-century Chinese Buddhist monk Yijing. According to Yijing, king Che-li-ki-to (identified with the dynasty's founder ''Shri'' Gupta) built a temple for Chinese pilgrims near Mi-li-kia-si-kia-po-no (apparently a transcription of Mriga-shikha-vana). Yijing states that this temple was located more than 40 ''yojanas'' east of Nalanda, which would mean it was situated somewhere in the modern Bengal region. Another proposal is that the early Gupta kingdom extended from Prayaga in the west to northern Bengal in the east. The Gupta records do not mention the dynasty's varna (social class). Some historians, such as A.S. Altekar, have theorised that they were of Vaishya origin, as certain ancient Indian texts prescribe the name "Gupta" for the members of the Vaishya varna. According to historian R. S. Sharma, the Vaishyas – who were traditionally associated with trade – may have become rulers after resisting oppressive taxation by the previous rulers. Critics of the Vaishya-origin theory point out that the suffix Gupta features in the names of several non-Vaishyas before as well as during the Gupta period, and the dynastic name "Gupta" may have simply derived from the name of the family's first king Gupta. Some scholars, such as S. R. Goyal, theorise that the Guptas were Brahmanas, because they had matrimonial relations with Brahmans, but others reject this evidence as inconclusive. Based on the Pune and Riddhapur inscriptions of the Gupta princess Prabhavati-gupta, some scholars believe that the name of her paternal gotra (clan) was "Dharana", but an alternative reading of these inscriptions suggests that Dharana was the ''gotra'' of her mother Kuberanaga. == History == Gupta (Gupta script:  ''gu-pta'', fl. late 3rd century CE) is the earliest known king of the dynasty: different historians variously date the beginning of his reign from mid-to-late 3rd century CE. Gupta founded the Gupta Empire <abbr>c.</abbr> 240-280 CE, and was succeeded by his son, Ghatotkacha, <abbr>c.</abbr> 280-319 CE, followed by Ghatotkacha's son, Chandragupta I, <abbr>c.</abbr> 319-335 CE. "Che-li-ki-to", the name of a king mentioned by the 7th century Chinese Buddhist monk Yijing, is believed to be a transcription of "Shri-Gupta" (IAST: Śrigupta), "Shri" being an honorific prefix. According to Yijing, this king built a temple for Chinese Buddhist pilgrims near "Mi-li-kia-si-kia-po-no" (believed to be a transcription of Mṛgaśikhāvana). In the Allahabad Pillar inscription, Gupta and his successor Ghatotkacha are described as ''Maharaja'' ("great king"), while the next king Chandragupta I is called a ''Maharajadhiraja'' ("king of great kings"). In the later period, the title ''Maharaja'' was used by feudatory rulers, which has led to suggestions that Gupta and Ghatotkacha were vassals (possibly of Kushan Empire).However, there are several instances of paramount sovereigns using the title ''Maharaja'', in both pre-Gupta and post-Gupta periods, so this cannot be said with certainty. That said, there is no doubt that Gupta and Ghatotkacha held a lower status and were less powerful than Chandragupta I. Chandragupta I married the Licchavi princess Kumaradevi, which may have helped him extend his political power and dominions, enabling him to adopt the imperial title ''Maharajadhiraja''. According to the dynasty's official records, he was succeeded by his son Samudragupta. However, the discovery of the coins issued by a Gupta ruler named Kachahave led to some debate on this topic: according to one theory, Kacha was another name for Samudragupta; another possibility is that Kacha was a rival claimant to the throne. === Samudragupta === See also: Samudragupta and Gupta conquests of Bengal Samudragupta succeeded his father around 335 or 350 CE, and ruled until <abbr>c.</abbr> 375 CE. The Allahabad Pillar inscription, composed by his courtier Harishena, credits him with extensive conquests. The inscription asserts that Samudragupta uprooted 8 kings of Āryāvarta, the northern region, including the Nagas. It further claims that he subjugated all the kings of the forest region, which was most probably located in central India. It also credits him with defeating 12 rulers of Dakshinapatha, the southern region: the exact identification of several of these kings is debated among modern scholars, but it is clear that these kings ruled areas located on the eastern coast of India.The inscription suggests that Samudragupta advanced as far as the Pallava kingdom in the south, and defeated Vishnugopa, the Pallava regent of Kanchi. During this southern campaign, Samudragupta most probably passed through the forest tract of central India, reached the eastern coast in present-day Odisha, and then marched south along the coast of the Bay of Bengal. Evolution of Gupta territory, with neighbouring polities The Allahabad Pillar inscription mentions that rulers of several frontier kingdoms and tribal oligarchiespaid Samudragupta tributes, obeyed his orders, and performed obeisance before him. The frontier kingdoms included Samatata, Davaka, Kamarupa, Nepala and Karttripura. The tribal oligarchies included Malavas, Arjunayanas, Yaudheyas, Madrakas, and Abhiras, among others. Finally, the inscription mentions that several foreign kings tried to please Samudragupta by personal attendance; offered him their daughters in marriage (or according to another interpretation, gifted him maidens); and sought the use of the Garuda-depicting Gupta seal for administering their own territories.This is an exaggeration: for example, the inscription lists the king of Simhala among these kings. It is known that from Chinese sources that the Simhala king Meghavarna sent rich presents to the Gupta king requesting his permission to build a Buddhist monastery at Bodh Gaya: Samudragupta's panegyrist appears to have described this act of diplomacy as an act of subservience. Samudragupta appears to have been Vaishnavite, as attested by his Eran inscription, and performed several Brahmanicalceremonies. The Gupta records credit him with making generous donations of cows and gold. He performed the Ashvamedha ritual (horse sacrifice), which was used by the ancient Indian kings to prove their imperial sovereignty, and issued gold coins (see Coinage below) to mark this performance. The Allahabad Pillar inscription presents Samudragupta as a wise king and strict administrator, who was also compassionate enough to help the poor and the helpless. It also alludes to the king's talents as a musician and a poet, and calls him the "king of poets". Such claims are corroborated by Samudragupta's gold coins, which depict him playing a veena. Samudragupta appears to have directly controlled a large part of the Indo-Gangetic Plain in present-day India, as well as a substantial part of central India. Besides, his empire comprised a number of monarchical and tribal tributary states of northern India, and of the south-eastern coastal region of India. === Ramagupta === Main article: Ramagupta Ramagupta is known from a sixth-century play, the ''Devichandragupta'', in which he surrenders his wife to the enemy Sakas and his brother Chandragupta has to sneak into the enemy camp to rescue her and kill the Saka king. The historicity of these events is unclear, but Ramagupta's existence is confirmed by three Jain statues found at Durjanpur, with inscriptions referring to him as the ''Maharajadhiraja''. A large number of his copper coins also have been found from the Eran-Vidisha region and classified in five distinct types, which include the ''Garuda'', ''Garudadhvaja'', ''lion'' and ''border legend''types. The Brahmi legends on these coins are written in the early Gupta style. === Chandragupta II "Vikramaditya" === Main article: Chandragupta II See also: Gupta conquests of Bengal According to the Gupta records, amongst his sons, Samudragupta nominated prince Chandragupta II, born of queen Dattadevi, as his successor. Chandragupta II, ''Vikramaditya''(Victory of the Sun), ruled from 375 until 415. He married a Kadamba princess of Kuntala and of Naga lineage (''Nāgakulotpannnā''), Kuberanaga. His daughter Prabhavatiguptafrom this Naga queen was married to Rudrasena II, the Vakatakaruler of Deccan. His son Kumaragupta I was married to a Kadamba princess of the Karnataka region. Chandragupta II expanded his realm westwards, defeating the Saka Western Kshatrapas of Malwa, Gujarat and Saurashtra in a campaign lasting until 409. His main opponent Rudrasimha III was defeated by 395, and he crushed the Bengal chiefdoms. This extended his control from coast to coast, established a second capital at Ujjain and was the high point of the empire.<sup>[''citation needed'']</sup> Kuntala inscriptions indicate rule of Chandragupta in Kuntala region of Indian state of Karnataka. Hunza inscription also indicate that Chandragupta was able to rule north western Indian subcontinent and proceeded to conquer Balkh, although some scholars have also disputed the identity of gupta king. Chalukyan ruler Vikramditya VI (r. 1076 – 1126 CE) mentions Chandragupta with his title and states"why should the glory of the Kings Vikramaditya and Nanda be a hindrance any longer ? he with a loud command abolished that (era), which has the name of Saka, and made that (era) which has the Chalukya counting". Despite the creation of the empire through war, the reign is remembered for its very influential style of Hindu art, literature, culture and science, especially during the reign of Chandragupta II. Some excellent works of Hindu art such as the panels at the Dashavatara Temple in Deogarh serve to illustrate the magnificence of Gupta art. Above all, it was the synthesis of elements that gave Gupta art its distinctive flavour. During this period, the Guptas were supportive of thriving Buddhist and Jaincultures as well, and for this reason, there is also a long history of non-Hindu Gupta period art. In particular, Gupta period Buddhist art was to be influential in most of East and Southeast Asia. Many advances were recorded by the Chinese scholar and traveller Faxian in his diary and published afterwards. The court of Chandragupta was made even more illustrious by the fact that it was graced by the ''Navaratna'' (Nine Jewels), a group of nine who excelled in the literary arts. Amongst these men was Kālidāsa, whose works dwarfed the works of many other literary geniuses, not only in his own age but in the years to come. Kalidasa was mainly known for his subtle exploitation of the ''shringara'' (romantic) element in his verse. ==== Chandragupta II's campaigns against foreign tribes ==== The 4th century Sanskrit poet Kalidasa credits Chandragupta Vikramaditya with conquering about twenty-one kingdoms, both in and outside India. After finishing his campaign in East and West India, Vikramaditya (Chandragupta II) proceeded northwards, subjugated the Parasikas, then the Hunas and the Kambojas tribes located in the west and east Oxus valleys respectively. Thereafter, the king proceeded into the Himalaya mountains to reduce the mountain tribes of the Kinnaras, Kiratas, as well as India proper.<sup>[''non-primary source needed'']</sup> In one of his works Kalidasa also credits him with the removal of the Sakas from the country. He wrote 'Wasn't it Vikramaditya who drove the Sakas out from the lovely city of Ujjain?'. The ''Brihatkathamanjari'' of the Kashmiri writer Kshemendrastates, King Vikramaditya (Chandragupta II) had "unburdened the sacred earth of the Barbarians like the Sakas, Mlecchas, Kambojas, Yavanas, Tusharas, Parasikas, Hunas, and others, by annihilating these sinful Mlecchas completely".<sup>[''non-primary source needed''][''unreliable source?'']</sup> ==== Faxian ==== Faxian, a Chinese Buddhist, was one of the pilgrims who visited India during the reign of the Gupta emperor Chandragupta II. He started his journey from China in 399 <small>CE</small> and reached India in 405 <small>CE</small>. During his stay in India up to 411 <small>CE</small>, he went on a pilgrimage to Mathura, Kannauj, Kapilavastu, Kushinagar, Vaishali, Pataliputra, Kashi, and Rajagriha, and made careful observations about the empire's conditions. Faxian was pleased with the mildness of administration. The Penal Code was mild, and offences were punished by fines only. From his accounts, the Gupta Empire was a prosperous period. His writings form one of the most important sources for the history of this period. Faxian on reaching Mathura comments––<blockquote>"The snow and heat are finely tempered, and there is neither hoarfrost nor snow. The people are numerous and happy. They have not to register their households. Only those who cultivate the royal land have to pay (a portion of) the gain from it. If they want to go, they go. If they want to stay on, they stay on. The king governs without decapitation or (other) corporal punishments. Criminals are simply fined according to circumstances. Even in cases of repeated attempts at wicked rebellion, they only have their right-hand cut off. The king's bodyguards & attendants all have salaries. Throughout the whole country, the people do not kill any living creature, not drink any intoxicating liquor, nor eat onions or garlic."</blockquote> === Kumaragupta I === Main article: Kumaragupta I Chandragupta II was succeeded by his second son Kumaragupta I, born of ''Mahadevi'' Dhruvasvamini. Kumaragupta I assumed the title, ''Mahendraditya''. He ruled until 455. Towards the end of his reign a tribe in the Narmada valley, the Pushyamitras, rose in power to threaten the empire. The Kidarites as well probably confronted the Gupta Empire towards the end of the rule of Kumaragupta I, as his son Skandaguptamentions in the Bhitari pillar inscription his efforts at reshaping a country in disarray, through reorganisation and military victories over the Pushyamitras and the Hunas. He was the founder of Nalanda University which on 15 July 2016 was declared as a UNESCO world heritage site.Kumaragupta I was also a worshipper of Kartikeya. c9af1981d0d99444e473c98344b366f878a4ab42 Pandurang Shastri Athavale 0 574 1338 1176 2024-03-16T13:43:37Z Motzoid India 2 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Pandurang Shastri Athavale''' |- | colspan="2" style="text-align:center;" | [[File:Pandurang Shastri Athavale, (1920-2003).jpg|200px|alt=Pandurang Shastri Athavale|Pandurang Shastri Athavale]] |- ! Birth date | 19 October 1920 |- ! Death Date | 25 October 2003 (Aged 83) |- ! Place of birth | Roha, British India |- ! Known For | Swadhyaya Parivar |- ! Spouse | Nirmala Tai Athavale |- ! Children | [[Jayshree Talwalkar]] |} </div> '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 297b3152b6211636110d3b72713325b6a6bb06fb 1341 1338 2024-03-16T13:55:29Z Motzoid India 2 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Pandurang Shastri Athavale''' |- | colspan="2" style="text-align:center;" | [[File:Pandurang Shastri Athavale, (1920-2003).jpg|200px|alt=Pandurang Shastri Athavale|Pandurang Shastri Athavale]] |- ! Birth date | 19 October 1920 |- ! Death Date | 25 October 2003 (Aged 83) |- ! Place of birth | Roha, British India |- ! Known For | Swadhyaya Parivar |- ! Spouse | [[Nirmala Tai Athavale]] |- ! Children | [[Jayshree Talwalkar]] |} </div> '''Rev. Pandurang Shastri Athavale''' (19 October 1920 – 25 October 2003), also known as '''Dada /Dadaji''', which literally translates as "elder brother" in Marathi, was an Indian activist, philosopher, spiritual leader, social revolutionary, and religion reformist, who founded the Swadhyaya Parivar (Swadhyaya family) in 1954. '''Swadhyaya''' is a self-study process based on the Bhagavad Gita which has spread across nearly 100,000 villages in India, Americas, Europe, Middle East, Oceania and other Asian countries with five million adherents. Noted for his discourses on the Bhagavad Gita, the Vedas and the Upanishads, Dadaji is also known for his selfless work and brilliant knowledge in scriptures. == Early life == Pandurang shastri Athavale was born on 19 of October 1920 in Chitpavan Brahmin Family in the village of Roha in Maharashtra (Konkan), India. He was one of five children born to the Sanskrit teacher Vaijanath Shastri Athavale and his wife Parvati Athavale. When Athavale was twelve years old, his father set up an independent course of study for the young boy. Thus, Athavale was taught in a system very similar to that of the Tapovan system of ancient India. In 1942, he started to give discourses at the ''Srimad Bhagavad Gita Pathshala, Madhavbaug, Mumbai", a center set up by his father in 1926.'' Athavale read diligently in the Royal Asiatic Library for a period of 14 years; at a young age, he was well known to have read every piece of non-fiction literature (ranging from Marx's philosophy to Whitehead's writings to ancient Indian philosophy). In 1954, he attended the Second World Philosophers' Conference, held in Japan. There, Athavale presented the concepts of Vedic ideals and the teachings of the Bhagavad Gita. Many participants were impressed by his ideas but wanted evidence of such ideals being put into practice in India. Nobel Prize–winning physicist Dr. Arthur Holly Compton was particularly enchanted with Athavale's ideas and offered him a lucrative opportunity in the United States, where he could spread his ideas. Athavale politely declined, saying that he had much to accomplish in his native India, where he planned to demonstrate to the world a model community peacefully practising and spreading Vedic thoughts and the message of the Bhagavad Gita. == Swadhyaya Parivar == The philosophy of original Vedic Dharma is the base of this movement. Swadhyaya Parivar established itself in India in 1978 with adherents meeting every Sunday, where prayers are sung and a video recording of Athavale teaching about the Vedic dharma is played. Swadhyaya, which closely translates to "study of the self" is a process based upon Vedic philosophy, and the members of the Parivar are called "Swadhyayees". Over the years, Athavale's followers have taken the Bhagavad Gita's concepts of Indwelling God and God's universal love, to millions of people: transcending caste, socioeconomic barriers, and religious differences. Athavale personally visited tens of thousands of villages (on foot and rented bicycles), and his brothers and sisters (swadhyayees) went to every house personally and established a selfless relationship with each family and went house to house to spread Gita's thoughts. adherents have followed suit to roughly 100,000 villages across India, and at least 34 nations across the globe. Dadaji In these villages, Athavale started various experiments (Prayogs) to impart social activism by means of a god-centric devotion, including cooperative farming, fishing and tree-planting projects in the spirit of collective, divine labour (bhakti), somewhat similar to the Antigonish Movement in Canada. Swadhyayees aim to fulfill Athavale's vision of eradicating the world's problems by creating a global family united under the principle of a universal blood maker. He felt that the universality of the Bhagavad Gita allows for it to a guide to all of humanity. As such, its thoughts should reach unto the last person. Today, the millions of adherents can be found on every habitable continent in over 35 countries including the Caribbean, Americas, Asia, Europe, Australia, New Zealand, Middle East and Africa. It is the Swadhyaya Parivar's mission to complete Rev. Athavale's vision of a ''"Universal Brotherhood under the Divine Fatherhood of God."'' == Death == Athavale died at the age of 83 of cardiac arrest on 25 October 2003, in Mumbai, India. He was cremated on the evening of 26 October at Tattvagyan Vidyapeeth in the Thane district, where hundreds of thousands of mourners had paid their respects to him over a period of 24 hours. Subsequently, his ashes were immersed at Ujjain, Pushkar, Haridwar, Kurukshetra, Gaya, Jagannath Puri, and lastly at Rameshwaram. == Popular culture == In 1991 Shyam Benegal created and directed the film ''Antarnaad'' (The Inner Voice), based on Athavale's Swadhyaya Movement or Prayogs, starring Shabana Azmi and Kulbhushan Kharbanda, among others. In 2004 Abir Bazaz directed the documentary ''Swadhyaya'', based on the life and works of Athavale. == Works == * There are multiple books based on Dadaji's pravachan based on Vedic Stotras, The Geeta, and Ramayan. His famous books include Valmiki Ramayan, Geeta Amrutam, Homage to Saints, Prarthana Preeti, Tulsidal, Sanskruti Pujan (describing about the appropriate definitions of culture and dharma), Vijigishu Jivanvad and many more. Written in multiple languages like Gujarati, Marathi, Hindi, and Sanskrit ''The Systems: The Way and the Work'' (Swadhyaya: The Unique Philosophy of Life), by Shri Pandurang Vaijnath Athavale Shastri (Dada). == Awards and prizes == He was awarded the Templeton Prize for Progress in Religion in 1997 and the Ramon Magsaysay Award in 1996 for ''Community Leadership'', along with India's second highest civilian honour, the Padma Vibhushan Award, in 1999. He also won the Rashtrabhusan award given to him by the FIE foundation for Progress in Religion. 4bc032ac6feb0ac2a2b474db16922dff2e6e44ff Nirmala Tai Athavale 0 659 1339 2024-03-16T13:46:54Z Motzoid India 2 Created page with "'''Nirmala Tai Athavale''', also known as '''Nirmala Athavale''' and '''Taiji''', was the wife of [[Pandurang Shastri Athavale]], the founder of the [[Swadhyaya Parivar]] movement. She played a significant role in supporting her husband's work and was an integral part of the Swadhyaya Parivar community. Nirmala Tai Athavale actively participated in various activities of the Swadhyaya Parivar, which focused on spiritual development, social service, and community building..." wikitext text/x-wiki '''Nirmala Tai Athavale''', also known as '''Nirmala Athavale''' and '''Taiji''', was the wife of [[Pandurang Shastri Athavale]], the founder of the [[Swadhyaya Parivar]] movement. She played a significant role in supporting her husband's work and was an integral part of the Swadhyaya Parivar community. Nirmala Tai Athavale actively participated in various activities of the Swadhyaya Parivar, which focused on spiritual development, social service, and community building. She was known for her dedication to the ideals of the movement and her contributions to its growth and outreach efforts. While Pandurang Shastri Athavale was the public face and spiritual leader of the Swadhyaya Parivar, Nirmala Tai Athavale provided invaluable support behind the scenes, helping to manage the organization and fostering a sense of community among its members. 7901cff615807d4f51594cb16621133505dbfe8c 1340 1339 2024-03-16T13:54:56Z Motzoid India 2 wikitext text/x-wiki Shrimati Nirmalatai  was the wife of [[Pandurang Shastri Athavale]] (Dadaji) who was  the founder of 'Swadhyaya Parivar'. Nirmalatai was born on   3 August 1926 in Gavkhadi village of Ratnagiri district of Maharashtra. Taiji, born in 'Sidhaye Kutumpur', was married to Pandurang Shastri in 1944. She died on 30 January 2017 at the age of 90. a110ecf07b0fe3ca4e09581126b6a3326141ecde 1342 1340 2024-03-16T13:56:07Z Motzoid India 2 wikitext text/x-wiki Nirmala Tai Athavale also known as Taiji was the wife of [[Pandurang Shastri Athavale]] (Dadaji) who was  the founder of 'Swadhyaya Parivar'. Nirmalatai was born on   3 August 1926 in Gavkhadi village of Ratnagiri district of Maharashtra. Taiji, born in 'Sidhaye Kutumpur', was married to Pandurang Shastri in 1944. She died on 30 January 2017 at the age of 90. 9e92d1ae3a48c68d4de168ee7007f56c652d3d9c Momai 0 660 1343 2024-03-16T14:45:25Z 80.5.18.102 0 Created page with "{| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Momai''' |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|alt=Murti of Dashama|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other_names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! image | Dashamaa.jpg |- ! animals | Came..." wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Momai''' |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|alt=Murti of Dashama|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other_names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! image | Dashamaa.jpg |- ! animals | Camel |- ! festivals | Dashama Vrata |- ! temples | [[Minavada, Gujarat|Minavada]] |} '''Momai''' or '''Momai Mata''' (Gujarati: મોમાઈ માં) also known as '''Dashama''' is a regional Hindu goddess, popular in Gujarat, especially in desert region of Kutch. == Description == Momai is the highest goddess of the Rabari Tribe. Sorathia group of Rabari called her as a mammai. The village Momai Mora located near Rapar in Kutch is the place where the deity is said to have first appeared, the temple is a place of pilgrimage and huge festival is celebrated here on eve of Navratri every year. She is worshiped as one of the kuldevi of Jadeja, Parmar, Sodha, Jadav, Baraliya (Ahir) and other rulers & worrier clans of erstwhile kutch State and is closely associated with the Goddess Ashapura. She is depicted as mounted on a camel, with four hands. She holds a sword and a trident in the upper right and left hand, respectively and in the lower right and left hands, she has a lotus and armor. Apart from jadeja, parmar, Sodha clan, she is worshiped as Kuldevi by Udesh gotra of Rajpurohit community. The Rabari clan of Kutch also worship her. Her image is found in almost every household of Rabaris. Bardai Brahmins also worship her as kuladevi. Many sub-clans of Mistris of Kutch also worship her as their kuladevi. == Dashama Vrata == Main Article: Dashamaa Vrat Dashama Vrata is an annual observance for Hindu people from the state of Gujarat, which begins on the amavasya of Ashadh month. The date of 2024 is 4th august. a5160c7bfe74e52668155da58b7a9fa3f1eee5d6 1344 1343 2024-03-16T14:46:07Z 80.5.18.102 0 wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Momai''' |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|alt=Murti of Dashama|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! image | Dashamaa.jpg |- ! animals | Camel |- ! festivals | Dashama Vrata |- ! temples | [[Minavada, Gujarat|Minavada]] |} '''Momai''' or '''Momai Mata''' (Gujarati: મોમાઈ માં) also known as '''Dashama''' is a regional Hindu goddess, popular in Gujarat, especially in desert region of Kutch. == Description == Momai is the highest goddess of the Rabari Tribe. Sorathia group of Rabari called her as a mammai. The village Momai Mora located near Rapar in Kutch is the place where the deity is said to have first appeared, the temple is a place of pilgrimage and huge festival is celebrated here on eve of Navratri every year. She is worshiped as one of the kuldevi of Jadeja, Parmar, Sodha, Jadav, Baraliya (Ahir) and other rulers & worrier clans of erstwhile kutch State and is closely associated with the Goddess Ashapura. She is depicted as mounted on a camel, with four hands. She holds a sword and a trident in the upper right and left hand, respectively and in the lower right and left hands, she has a lotus and armor. Apart from jadeja, parmar, Sodha clan, she is worshiped as Kuldevi by Udesh gotra of Rajpurohit community. The Rabari clan of Kutch also worship her. Her image is found in almost every household of Rabaris. Bardai Brahmins also worship her as kuladevi. Many sub-clans of Mistris of Kutch also worship her as their kuladevi. == Dashama Vrata == Main Article: Dashamaa Vrat Dashama Vrata is an annual observance for Hindu people from the state of Gujarat, which begins on the amavasya of Ashadh month. The date of 2024 is 4th august. 3694c79610e10fe56cc73356801cb79a5993a89f 1345 1344 2024-03-16T14:47:55Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%; |+ '''Momai''' |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|alt=Murti of Dashama|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! image | Dashamaa.jpg |- ! animals | Camel |- ! festivals | Dashama Vrata |- ! temples | [[Minavada, Gujarat|Minavada]] |} </div> '''Momai''' or '''Momai Mata''' (Gujarati: મોમાઈ માં) also known as '''Dashama''' is a regional Hindu goddess, popular in Gujarat, especially in desert region of Kutch. == Description == Momai is the highest goddess of the Rabari Tribe. Sorathia group of Rabari called her as a mammai. The village Momai Mora located near Rapar in Kutch is the place where the deity is said to have first appeared, the temple is a place of pilgrimage and huge festival is celebrated here on eve of Navratri every year. She is worshiped as one of the kuldevi of Jadeja, Parmar, Sodha, Jadav, Baraliya (Ahir) and other rulers & worrier clans of erstwhile kutch State and is closely associated with the Goddess Ashapura. She is depicted as mounted on a camel, with four hands. She holds a sword and a trident in the upper right and left hand, respectively and in the lower right and left hands, she has a lotus and armor. Apart from jadeja, parmar, Sodha clan, she is worshiped as Kuldevi by Udesh gotra of Rajpurohit community. The Rabari clan of Kutch also worship her. Her image is found in almost every household of Rabaris. Bardai Brahmins also worship her as kuladevi. Many sub-clans of Mistris of Kutch also worship her as their kuladevi. == Dashama Vrata == Main Article: Dashamaa Vrat Dashama Vrata is an annual observance for Hindu people from the state of Gujarat, which begins on the amavasya of Ashadh month. The date of 2024 is 4th august. de542e9603c703fd7ff9b572ed999234dae9634f 1346 1345 2024-03-16T14:48:48Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> === '''Momai''' === {| class="infobox" style="width: 250px; font-size: 85%;" |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! animals | Camel |- ! festivals | Dashama Vrata |- ! temples | [[Minavada, Gujarat|Minavada]] |} </div> '''Momai''' or '''Momai Mata''' (Gujarati: મોમાઈ માં) also known as '''Dashama''' is a regional Hindu goddess, popular in Gujarat, especially in desert region of Kutch. == Description == Momai is the highest goddess of the Rabari Tribe. Sorathia group of Rabari called her as a mammai. The village Momai Mora located near Rapar in Kutch is the place where the deity is said to have first appeared, the temple is a place of pilgrimage and huge festival is celebrated here on eve of Navratri every year. She is worshiped as one of the kuldevi of Jadeja, Parmar, Sodha, Jadav, Baraliya (Ahir) and other rulers & worrier clans of erstwhile kutch State and is closely associated with the Goddess Ashapura. She is depicted as mounted on a camel, with four hands. She holds a sword and a trident in the upper right and left hand, respectively and in the lower right and left hands, she has a lotus and armor. Apart from jadeja, parmar, Sodha clan, she is worshiped as Kuldevi by Udesh gotra of Rajpurohit community. The Rabari clan of Kutch also worship her. Her image is found in almost every household of Rabaris. Bardai Brahmins also worship her as kuladevi. Many sub-clans of Mistris of Kutch also worship her as their kuladevi. == Dashama Vrata == Main Article: Dashamaa Vrat Dashama Vrata is an annual observance for Hindu people from the state of Gujarat, which begins on the amavasya of Ashadh month. The date of 2024 is 4th august. 4fb21a1c84b9f57ff131b70c6079cbd7622e75b3 1347 1346 2024-03-16T14:49:40Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> === '''Momai''' === {| class="infobox" style="width: 250px; font-size: 85%;" |- | colspan="2" style="text-align:center;" | [[File:Dashamaa.jpg|200px|[[Murti]] of Dashama]] |- ! type | Hindu |- ! other names | Dashama |- ! mantra | Om Aim Hrim Klim Dashamaa Namo Namah |- ! weapon | [[Trishula]], Sword |- ! caption | [[Murti]] of Dashama |- ! animals | Camel |- ! festivals | Dashama Vrata |- ! temples | [[Minavada, Gujarat|Minavada]] |} </div> '''Momai''' or '''Momai Mata''' (Gujarati: મોમાઈ માં) also known as '''Dashama''' is a regional Hindu goddess, popular in Gujarat, especially in desert region of Kutch. == Description == Momai is the highest goddess of the Rabari Tribe. Sorathia group of Rabari called her as a mammai. The village Momai Mora located near Rapar in Kutch is the place where the deity is said to have first appeared, the temple is a place of pilgrimage and huge festival is celebrated here on eve of Navratri every year. She is worshiped as one of the kuldevi of Jadeja, Parmar, Sodha, Jadav, Baraliya (Ahir) and other rulers & worrier clans of erstwhile kutch State and is closely associated with the Goddess Ashapura. She is depicted as mounted on a camel, with four hands. She holds a sword and a trident in the upper right and left hand, respectively and in the lower right and left hands, she has a lotus and armor. Apart from jadeja, parmar, Sodha clan, she is worshiped as Kuldevi by Udesh gotra of Rajpurohit community. The Rabari clan of Kutch also worship her. Her image is found in almost every household of Rabaris. Bardai Brahmins also worship her as kuladevi. Many sub-clans of Mistris of Kutch also worship her as their kuladevi. == Dashama Vrata == Main Article: [[Dashama Vrat]] Dashama Vrata is an annual observance for Hindu people from the state of Gujarat, which begins on the amavasya of Ashadh month. The date of 2024 is 4th august. a1e7c8d418054b4315f4561f1da4d0b6b57c6ece Dashama Vrat 0 661 1348 2024-03-16T14:50:47Z 80.5.18.102 0 Created page with "'''Dashama Vrata''' (Gujarati:દશામા વ્રત) is an annual 10-day Hindu festival or vrata (religious vow), mainly observed in the Indian state of Gujarat and Diu. This vrata is usually observed in July–August on the amavasya (new moon day) of the Hindu month of Ashadha. Many people also observe the vrata in the month of Chaitra (March). The vrata is dedicated to the goddess Dashama or Momai. The vrata is mainly observed by women for prosperity and good fo..." wikitext text/x-wiki '''Dashama Vrata''' (Gujarati:દશામા વ્રત) is an annual 10-day Hindu festival or vrata (religious vow), mainly observed in the Indian state of Gujarat and Diu. This vrata is usually observed in July–August on the amavasya (new moon day) of the Hindu month of Ashadha. Many people also observe the vrata in the month of Chaitra (March). The vrata is dedicated to the goddess Dashama or Momai. The vrata is mainly observed by women for prosperity and good fortune of their family. == Vrata[edit] == On the amavasya (new moon day) of the Hindu month of Ashadha, devotees observe Dashama Vrata by installing a ''Sandhani'' made of soil in their home. Devotees also install a ''murti'' (icon) or image of the goddess Dashama with an icon of the Hindu god Ganesha. Devotees who observe this vrata wear the ''Kautuka'' (red-coloured thread) with 10 knots on their right hand on the first day and eat once a day (''ek tanu''). Daily, devotees perform ''puja'' (ritual worship), ''arti'', reads the ''katha'' (legend) and then eats prasada (food offering). Devotees also participate in jagarana, a night vigil of prayer and worship. The vrata is observed for 10 days. On the last day, devotees observe the jagaran and around 4-5 AM, the ''murti'' is immersed into a water body like a river. The vrata is observed for 5 years and on the fifth year, the observer is prescribed to make a Sandhani made out of silver and donate to an auspicious brahmin. == Date[edit] == The dates of the vrata can vary as it is based on Gujarati Calendar of Vikram Samvat and observed on the amavasya of the Ashadha month. It is usually observed between July-August. {| class="wikitable" |+ !Year !Date |- |2018 |12 August |- |2019 |2 August |- |2020 |21 July |- |2021 |9 August |- |2022 |28 July |- |2023 |17 July/17 August |- |2024 |4 August |} 78e7ba5e8decca2446e3b09259d32c97e987e2cc 1349 1348 2024-03-16T14:51:16Z 80.5.18.102 0 wikitext text/x-wiki '''Dashama Vrata''' (Gujarati:દશામા વ્રત) is an annual 10-day Hindu festival or vrata (religious vow), mainly observed in the Indian state of Gujarat and Diu. This vrata is usually observed in July–August on the amavasya (new moon day) of the Hindu month of Ashadha. Many people also observe the vrata in the month of Chaitra (March). The vrata is dedicated to the goddess Dashama or Momai. The vrata is mainly observed by women for prosperity and good fortune of their family. == Vrata == On the amavasya (new moon day) of the Hindu month of Ashadha, devotees observe Dashama Vrata by installing a ''Sandhani'' made of soil in their home. Devotees also install a ''murti'' (icon) or image of the goddess Dashama with an icon of the Hindu god Ganesha. Devotees who observe this vrata wear the ''Kautuka'' (red-coloured thread) with 10 knots on their right hand on the first day and eat once a day (''ek tanu''). Daily, devotees perform ''puja'' (ritual worship), ''arti'', reads the ''katha'' (legend) and then eats prasada (food offering). Devotees also participate in jagarana, a night vigil of prayer and worship. The vrata is observed for 10 days. On the last day, devotees observe the jagaran and around 4-5 AM, the ''murti'' is immersed into a water body like a river. The vrata is observed for 5 years and on the fifth year, the observer is prescribed to make a Sandhani made out of silver and donate to an auspicious brahmin. == Date == The dates of the vrata can vary as it is based on Gujarati Calendar of Vikram Samvat and observed on the amavasya of the Ashadha month. It is usually observed between July-August. {| class="wikitable" |+ !Year !Date |- |2018 |12 August |- |2019 |2 August |- |2020 |21 July |- |2021 |9 August |- |2022 |28 July |- |2023 |17 July/17 August |- |2024 |4 August |} 7c15da63c64950525b3c367d70b7c06805838f69 1350 1349 2024-03-16T14:59:50Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Dashama Vrat''' |- | colspan="2" style="text-align:center;" | [[File:Dashamaa Vart 2023.jpg|200px|alt=Dashamaa Vrat|Dashamaa Vrat]] |- ! Observed by | [[Hindus]] |- ! Type | [[Vrat]] |- ! Begins | Amavasya of Ashadh |- ! End | 10 Days after |- ! Frequency | Annual |} </div> '''Dashama Vrata''' (Gujarati:દશામા વ્રત) is an annual 10-day Hindu festival or vrat (religious vow), mainly observed in the Indian state of [[Gujarat]] and [[Diu]]. This vrat is usually observed in July–August on the amavasya (new moon day) of the Hindu month of Ashadha. Many people also observe the vrata in the month of Chaitra (March). The vrat is dedicated to the goddess Dashama or Momai. The vrat is mainly observed by women for prosperity and good fortune of their family. == Vrata == On the amavasya (new moon day) of the Hindu month of Ashadha, devotees observe Dashama Vrat by installing a ''Sandhani'' made of soil in their home. Devotees also install a ''murti'' (icon) or image of the goddess Dashama with an icon of the Hindu god Ganesha. Devotees who observe this vrata wear the ''Kautuka'' (red-coloured thread) with 10 knots on their right hand on the first day and eat once a day (''ek tanu''). Daily, devotees perform ''puja'' (ritual worship), ''arti'', reads the ''katha'' (legend) and then eats prasada (food offering). Devotees also participate in jagarana, a night vigil of prayer and worship. The vrata is observed for 10 days. On the last day, devotees observe the jagaran and around 4-5 AM, the ''murti'' is immersed into a water body like a river. The vrat is observed for 5 years and on the fifth year, the observer is prescribed to make a Sandhani made out of silver and donate to an auspicious brahmin. == Date == The dates of the vrat can vary as it is based on Gujarati Calendar of Vikram Samvat and observed on the amavasya of the Ashadha month. It is usually observed between July-August. {| class="wikitable" |+ !Year !Date |- |2018 |12 August |- |2019 |2 August |- |2020 |21 July |- |2021 |9 August |- |2022 |28 July |- |2023 |17 July/17 August |- |2024 |4 August |} c6523623601bdd943b32562916d62cf8244467f3 Gujarat 0 662 1351 2024-03-16T15:01:08Z 80.5.18.102 0 Created page with "'''Gujarat''' (/ˌɡʊdʒəˈrɑːt/ ''GUUJ-ə-RAHT'', Gujarati: [ˈɡudʒəɾat̪] <sup>ⓘ</sup>) is a state along the western coast of India. Its coastline of about 1,600 km (990 mi) is the longest in the country, most of which lies on the Kathiawar peninsula. Gujarat is the fifth-largest Indian state by area, covering some 196,024 km<sup>2</sup> (75,685 sq mi); and the ninth-most populous state, with a population of 60.4 million in 2011. It is bordered by Rajasthan t..." wikitext text/x-wiki '''Gujarat''' (/ˌɡʊdʒəˈrɑːt/ ''GUUJ-ə-RAHT'', Gujarati: [ˈɡudʒəɾat̪] <sup>ⓘ</sup>) is a state along the western coast of India. Its coastline of about 1,600 km (990 mi) is the longest in the country, most of which lies on the Kathiawar peninsula. Gujarat is the fifth-largest Indian state by area, covering some 196,024 km<sup>2</sup> (75,685 sq mi); and the ninth-most populous state, with a population of 60.4 million in 2011. It is bordered by Rajasthan to the northeast, Dadra and Nagar Haveli and Daman and Diu to the south, Maharashtra to the southeast, Madhya Pradesh to the east, and the Arabian Sea and the Pakistani province of Sindh to the west. Gujarat's capital city is Gandhinagar, while its largest city is Ahmedabad. The Gujaratis are indigenous to the state and their language, Gujarati, is the state's official language. The state encompasses 23 sites of the ancient Indus Valley civilisation (more than any other state). The most important sites are Lothal (the world's first dry dock), Dholavira (the fifth largest site), and Gola Dhoro (where 5 uncommon seals were found). Lothal is believed to have been one of the world's first seaports. Gujarat's coastal cities, chiefly Bharuch and Khambhat, served as ports and trading centres in the Maurya and Gupta empires and during the succession of royal Saka dynasties in the Western Satraps era. Along with Bihar, Mizoram and Nagaland, Gujarat is one of four Indian states to prohibit the sale of alcohol. The Gir Forest National Park in Gujarat is home to the only wild population of the Asiatic lion in the world. The economy of Gujarat is the fourth-largest in India, with a gross state domestic product (GSDP) of ₹16.55 trillion (equivalent to ₹19 trillion or US$230 billion in 2023) and has the country's 10th-highest GSDP per capita of ₹215,000 (US$2,700). Gujarat has the highest exports of all states, accounting for around one-third of national exports. It ranks 21st among Indian states and union territories in human development index. Gujarat is regarded as one of the most industrialised states and has a low unemployment rate, but the state ranks poorly on some social indicators and is at times affected by religious violence. == Etymology == Gujarat is derived from the Gurjara-Pratihara dynasty, who ruled Gujarat in the 8th and 9th centuries CE. Parts of modern Rajasthan and Gujarat have been known as ''Gurjarat'' or ''Gurjarabhumi'' for centuries before the Mughal period. == History == Main article: History of Gujarat === Ancient history === Gujarat was one of the main central areas of the Indus Valley civilisation, which is centred primarily in modern Pakistan. It contains ancient metropolitan cities from the Indus Valley such as Lothal, Dholavira and Gola Dhoro. The ancient city of Lothal was where India's first port was established. The ancient city of Dholavira is one of the largest and most prominent archaeological sites in India, belonging to the Indus Valley civilisation. The most recent discovery was Gola Dhoro. Altogether, about fifty Indus Valley settlement ruins have been discovered in Gujarat.The ancient history of Gujarat was enriched by the commercial activities of its inhabitants. There is clear historical evidence of trade and commerce ties with Egypt, Bahrain and Sumer in the Persian Gulf during the time period of 1000 to 750 BCE. There was a succession of various Indian empires such as the Mauryan dynasty, Western Satraps, Satavahana dynasty, Gupta Empire, Chalukya dynasty, Rashtrakuta Empire, Pala Empire and Gurjara-Pratihara Empire, as well as the Maitrakas and then the Chaulukyas. The early history of Gujarat includes the imperial grandeur of Chandragupta Maurya who conquered a number of earlier states in what is now Gujarat. Pushyagupta, a Vaishya, was appointed the governor of Saurashtra by the Mauryan regime. He ruled Girinagar (modern-day Junagadh) (322 BCE to 294 BCE) and built a dam on the Sudarshan lake. Emperor Ashoka the Great, the grandson of Chandragupta Maurya, not only ordered his edicts engraved in the rock at Junagadh, but also asked Governor Tusherpha to cut canals from the lake where an earlier Indian governor had built a dam. Between the decline of Mauryan power and Saurashtra coming under the sway of the Samprati Mauryas of Ujjain, there was an Indo-Greek defeat in Gujarat of Demetrius. In 16th century manuscripts, there is an apocryphal story of a merchant of King Gondophares landing in Gujarat with Apostle Thomas. The incident of the cup-bearer torn apart by a lion might indicate that the port city described is in Gujarat. For nearly 300 years from the start of the 1st century CE, Saka rulers played a prominent part in Gujarat's history. The weather-beaten rock at Junagadh gives a glimpse of the ruler Rudradaman I (100 CE) of the Saka satraps known as Western Satraps, or Kshatraps. Mahakshatrap Rudradaman I founded the Kardamaka dynasty which ruled from Anupa on the banks of the Narmada up to the Aparanta region bordering Punjab. In Gujarat, several battles were fought between the Indian dynasties such as the Satavahana dynasty and the Western Satraps. The greatest and the mightiest ruler of the Satavahana dynasty was Gautamiputra Satakarni who defeated the Western Satraps and conquered some parts of Gujarat in the 2nd century CE. The Kshatrapa dynasty was replaced by the Gupta Empire with the conquest of Gujarat by Chandragupta Vikramaditya. Vikramaditya's successor Skandagupta left an inscription (450 CE) on a rock at Junagadh which gives details of the governor's repairs to the embankment surrounding Sudarshan lake after it was damaged by floods. The Anarta and Saurashtra regions were both parts of the Gupta empire. Towards the middle of the 5th century, the Gupta empire went into decline. Senapati Bhatarka, the general of the Guptas, took advantage of the situation and in 470 set up what came to be known as the Maitraka state. He shifted his capital from Giringer to Valabhi, near Bhavnagar, on Saurashtra's east coast. The Maitrakas of Vallabhi became very powerful with their rule prevailing over large parts of Gujarat and adjoining Malwa. A university was set up by the Maitrakas, which came to be known far and wide for its scholastic pursuits and was compared with the noted Nalanda University. It was during the rule of Dhruvasena Maitrak that Chinese philosopher-traveler Xuanzang/ I Tsing visited in 640 along the Silk Road. Gujarat was known to the ancient Greeks and was familiar with other Western centers of civilisation through the end of the European Middle Ages. The oldest written record of Gujarat's 2,000-year maritime history is documented in a Greek book titled ''The Periplus of the Erythraean Sea: Travel and Trade in the Indian Ocean by a Merchant of the First Century''. === Medieval history === In the early 8th century, the Arabs of the Umayyad Caliphate established an empire in the name of the rising religion of Islam, which stretched from Spain in the west to Afghanistan and modern-day Pakistan in the east. Al-Junaid, the successor of Qasim, finally subdued the Hindu resistance within Sindh and established a secure base. The Arab rulers tried to expand their empire southeast, which culminated in the Caliphate campaigns in India fought in 730; they were defeated and expelled west of the Indus river, probably by a coalition of the Indian rulers Nagabhata I of the Gurjara-Pratihara dynasty, Vikramaditya II of the Chalukya dynasty and Bappa Rawal of the Guhila dynasty. After this victory, the Arab invaders were driven out of Gujarat. General Pulakeshin, a Chalukya prince of Lata, received the title ''Avanijanashraya'' (refuge of the people of the earth) and honorific of "Repeller of the unrepellable" by the Chalukya emperor Vikramaditya II for his victory at the battle at Navsari, where the Arab troops suffered a crushing defeat. In the late 8th century, the Kannauj Triangle period started. The three major Indian dynasties – the northwestern Indian Gurjara-Pratihara dynasty, the southern Indian Rashtrakuta dynasty and the eastern Indian Pala Empire – dominated India from the 8th to 10th centuries. During this period the northern part of Gujarat was ruled by the northern Indian Gurjara-Pratihara dynasty and the southern part of Gujarat was ruled by the southern Indian Rashtrakuta dynasty. However, the earliest epigraphical records of the Gurjars of Broach attest that the royal bloodline of the Gurjara-Pratihara dynasty of Dadda I, II and III (650–750) ruled south Gujarat. Southern Gujarat was ruled by the Indian Rashtrakuta dynasty until it was captured by the Indian ruler Tailapa II of the Western Chalukya Empire. Zoroastrians from Greater Iran migrated to the western borders of India (Gujarat and Sindh) during the 8th or 10th century, to avoid persecution by Muslim invaders who were in the process of conquering Iran. The descendants of those Zoroastrian refugees came to be known as the Parsi. Subsequently, Lāṭa in southern Gujarat was ruled by the Rashtrakuta dynasty until it was captured by the Western Chalukya ruler Tailapa II. The Chaulukya dynasty ruled Gujarat from c. 960 to 1243. Gujarat was a major center of Indian Ocean trade, and their capital at Anhilwara (Patan) was one of the largest cities in India, with a population estimated at 100,000 in the year 1000. After 1243, the Solankis lost control of Gujarat to their feudatories, of whom the Vaghela chiefs of Dholka came to dominate Gujarat. In 1292 the Vaghelas became tributaries of the Yadava dynasty of Devagiri in the Deccan. Karandev of the Vaghela dynasty was the last Hindu ruler of Gujarat. He was defeated and overthrown by the superior forces of Alauddin Khalji from Delhi in 1297. With his defeat, Gujarat became part of the Delhi Sultanate, and the Rajput hold over Gujarat would never be restored. Fragments of printed cotton from Gujarat have been discovered in Egypt, providing evidence for medieval trade in the western Indian Ocean. These fragments represent the Indian cotton traded in Egypt during the Fatimid, Ayyubid and Mamluk periods, from the tenth to sixteenth centuries. Similar cotton was also traded as far east as Indonesia. edfdde9a94d64c2a84f582a8553540fb2962d310 1352 1351 2024-03-16T15:02:10Z 80.5.18.102 0 wikitext text/x-wiki '''Gujarat''' (/ˌɡʊdʒəˈrɑːt/ ''GUUJ-ə-RAHT'', Gujarati: [ˈɡudʒəɾat̪] <sup>ⓘ</sup>) is a state along the western coast of India. Its coastline of about 1,600 km (990 mi) is the longest in the country, most of which lies on the Kathiawar peninsula. Gujarat is the fifth-largest Indian state by area, covering some 196,024 km<sup>2</sup> (75,685 sq mi); and the ninth-most populous state, with a population of 60.4 million in 2011. It is bordered by Rajasthan to the northeast, Dadra and Nagar Haveli and Daman and Diu to the south, Maharashtra to the southeast, Madhya Pradesh to the east, and the Arabian Sea and the Pakistani province of Sindh to the west. Gujarat's capital city is Gandhinagar, while its largest city is Ahmedabad. The Gujaratis are indigenous to the state and their language, Gujarati, is the state's official language. The state encompasses 23 sites of the ancient Indus Valley civilisation (more than any other state). The most important sites are Lothal (the world's first dry dock), Dholavira (the fifth largest site), and Gola Dhoro (where 5 uncommon seals were found). Lothal is believed to have been one of the world's first seaports. Gujarat's coastal cities, chiefly Bharuch and Khambhat, served as ports and trading centres in the Maurya and Gupta empires and during the succession of royal Saka dynasties in the Western Satraps era. Along with Bihar, Mizoram and Nagaland, Gujarat is one of four Indian states to prohibit the sale of alcohol. The Gir Forest National Park in Gujarat is home to the only wild population of the Asiatic lion in the world. The economy of Gujarat is the fourth-largest in India, with a gross state domestic product (GSDP) of ₹16.55 trillion (equivalent to ₹19 trillion or US$230 billion in 2023) and has the country's 10th-highest GSDP per capita of ₹215,000 (US$2,700). Gujarat has the highest exports of all states, accounting for around one-third of national exports. It ranks 21st among Indian states and union territories in human development index. Gujarat is regarded as one of the most industrialised states and has a low unemployment rate, but the state ranks poorly on some social indicators and is at times affected by religious violence. == Etymology == Gujarat is derived from the Gurjara-Pratihara dynasty, who ruled Gujarat in the 8th and 9th centuries CE. Parts of modern Rajasthan and Gujarat have been known as ''Gurjarat'' or ''Gurjarabhumi'' for centuries before the Mughal period. == History == Main article: History of Gujarat === Ancient history === Gujarat was one of the main central areas of the Indus Valley civilisation, which is centred primarily in modern Pakistan. It contains ancient metropolitan cities from the Indus Valley such as Lothal, Dholavira and Gola Dhoro. The ancient city of Lothal was where India's first port was established. The ancient city of Dholavira is one of the largest and most prominent archaeological sites in India, belonging to the Indus Valley civilisation. The most recent discovery was Gola Dhoro. Altogether, about fifty Indus Valley settlement ruins have been discovered in Gujarat.The ancient history of Gujarat was enriched by the commercial activities of its inhabitants. There is clear historical evidence of trade and commerce ties with Egypt, Bahrain and Sumer in the Persian Gulf during the time period of 1000 to 750 BCE. There was a succession of various Indian empires such as the Mauryan dynasty, Western Satraps, Satavahana dynasty, Gupta Empire, Chalukya dynasty, Rashtrakuta Empire, Pala Empire and Gurjara-Pratihara Empire, as well as the Maitrakas and then the Chaulukyas. The early history of Gujarat includes the imperial grandeur of Chandragupta Maurya who conquered a number of earlier states in what is now Gujarat. Pushyagupta, a Vaishya, was appointed the governor of Saurashtra by the Mauryan regime. He ruled Girinagar (modern-day Junagadh) (322 BCE to 294 BCE) and built a dam on the Sudarshan lake. Emperor Ashoka the Great, the grandson of Chandragupta Maurya, not only ordered his edicts engraved in the rock at Junagadh, but also asked Governor Tusherpha to cut canals from the lake where an earlier Indian governor had built a dam. Between the decline of Mauryan power and Saurashtra coming under the sway of the Samprati Mauryas of Ujjain, there was an Indo-Greek defeat in Gujarat of Demetrius. In 16th century manuscripts, there is an apocryphal story of a merchant of King Gondophares landing in Gujarat with Apostle Thomas. The incident of the cup-bearer torn apart by a lion might indicate that the port city described is in Gujarat. For nearly 300 years from the start of the 1st century CE, Saka rulers played a prominent part in Gujarat's history. The weather-beaten rock at Junagadh gives a glimpse of the ruler Rudradaman I (100 CE) of the Saka satraps known as Western Satraps, or Kshatraps. Mahakshatrap Rudradaman I founded the Kardamaka dynasty which ruled from Anupa on the banks of the Narmada up to the Aparanta region bordering Punjab. In Gujarat, several battles were fought between the Indian dynasties such as the Satavahana dynasty and the Western Satraps. The greatest and the mightiest ruler of the Satavahana dynasty was Gautamiputra Satakarni who defeated the Western Satraps and conquered some parts of Gujarat in the 2nd century CE. The Kshatrapa dynasty was replaced by the Gupta Empire with the conquest of Gujarat by Chandragupta Vikramaditya. Vikramaditya's successor Skandagupta left an inscription (450 CE) on a rock at Junagadh which gives details of the governor's repairs to the embankment surrounding Sudarshan lake after it was damaged by floods. The Anarta and Saurashtra regions were both parts of the Gupta empire. Towards the middle of the 5th century, the Gupta empire went into decline. Senapati Bhatarka, the general of the Guptas, took advantage of the situation and in 470 set up what came to be known as the Maitraka state. He shifted his capital from Giringer to Valabhi, near Bhavnagar, on Saurashtra's east coast. The Maitrakas of Vallabhi became very powerful with their rule prevailing over large parts of Gujarat and adjoining Malwa. A university was set up by the Maitrakas, which came to be known far and wide for its scholastic pursuits and was compared with the noted Nalanda University. It was during the rule of Dhruvasena Maitrak that Chinese philosopher-traveler Xuanzang/ I Tsing visited in 640 along the Silk Road. Gujarat was known to the ancient Greeks and was familiar with other Western centers of civilisation through the end of the European Middle Ages. The oldest written record of Gujarat's 2,000-year maritime history is documented in a Greek book titled ''The Periplus of the Erythraean Sea: Travel and Trade in the Indian Ocean by a Merchant of the First Century''. === Medieval history === In the early 8th century, the Arabs of the Umayyad Caliphate established an empire in the name of the rising religion of Islam, which stretched from Spain in the west to Afghanistan and modern-day Pakistan in the east. Al-Junaid, the successor of Qasim, finally subdued the Hindu resistance within Sindh and established a secure base. The Arab rulers tried to expand their empire southeast, which culminated in the Caliphate campaigns in India fought in 730; they were defeated and expelled west of the Indus river, probably by a coalition of the Indian rulers Nagabhata I of the Gurjara-Pratihara dynasty, Vikramaditya II of the Chalukya dynasty and Bappa Rawal of the Guhila dynasty. After this victory, the Arab invaders were driven out of Gujarat. General Pulakeshin, a Chalukya prince of Lata, received the title ''Avanijanashraya'' (refuge of the people of the earth) and honorific of "Repeller of the unrepellable" by the Chalukya emperor Vikramaditya II for his victory at the battle at Navsari, where the Arab troops suffered a crushing defeat. In the late 8th century, the Kannauj Triangle period started. The three major Indian dynasties – the northwestern Indian Gurjara-Pratihara dynasty, the southern Indian Rashtrakuta dynasty and the eastern Indian Pala Empire – dominated India from the 8th to 10th centuries. During this period the northern part of Gujarat was ruled by the northern Indian Gurjara-Pratihara dynasty and the southern part of Gujarat was ruled by the southern Indian Rashtrakuta dynasty. However, the earliest epigraphical records of the Gurjars of Broach attest that the royal bloodline of the Gurjara-Pratihara dynasty of Dadda I, II and III (650–750) ruled south Gujarat. Southern Gujarat was ruled by the Indian Rashtrakuta dynasty until it was captured by the Indian ruler Tailapa II of the Western Chalukya Empire. Zoroastrians from Greater Iran migrated to the western borders of India (Gujarat and Sindh) during the 8th or 10th century, to avoid persecution by Muslim invaders who were in the process of conquering Iran. The descendants of those Zoroastrian refugees came to be known as the Parsi. Subsequently, Lāṭa in southern Gujarat was ruled by the Rashtrakuta dynasty until it was captured by the Western Chalukya ruler Tailapa II. The Chaulukya dynasty ruled Gujarat from c. 960 to 1243. Gujarat was a major center of Indian Ocean trade, and their capital at Anhilwara (Patan) was one of the largest cities in India, with a population estimated at 100,000 in the year 1000. After 1243, the Solankis lost control of Gujarat to their feudatories, of whom the Vaghela chiefs of Dholka came to dominate Gujarat. In 1292 the Vaghelas became tributaries of the Yadava dynasty of Devagiri in the Deccan. Karandev of the Vaghela dynasty was the last Hindu ruler of Gujarat. He was defeated and overthrown by the superior forces of Alauddin Khalji from Delhi in 1297. With his defeat, Gujarat became part of the Delhi Sultanate, and the Rajput hold over Gujarat would never be restored. Fragments of printed cotton from Gujarat have been discovered in Egypt, providing evidence for medieval trade in the western Indian Ocean. These fragments represent the Indian cotton traded in Egypt during the Fatimid, Ayyubid and Mamluk periods, from the tenth to sixteenth centuries. Similar cotton was also traded as far east as Indonesia. 94ea098a067de80d0e6970ec95d34c3b41b238c9 Diu 0 663 1353 2024-03-16T15:09:46Z 80.5.18.102 0 Created page with "'''Diu''' (/ˈdiːuː/), also known as '''Diu Town''', is a medieval fortified town in Diu district in the union territory of Dadra and Nagar Haveli and Daman and Diu, [[India]]. Diu district is the tenth least populated district of India. The town of Diu lies at the eastern end of Diu Island and is known for its fortress and old Portuguese cathedral. It is a fishing town. The city is one of the hundred Indian cities competing in a national level competition to get fund..." wikitext text/x-wiki '''Diu''' (/ˈdiːuː/), also known as '''Diu Town''', is a medieval fortified town in Diu district in the union territory of Dadra and Nagar Haveli and Daman and Diu, [[India]]. Diu district is the tenth least populated district of India. The town of Diu lies at the eastern end of Diu Island and is known for its fortress and old Portuguese cathedral. It is a fishing town. The city is one of the hundred Indian cities competing in a national level competition to get funds under Narendra Modi's flagship Smart Cities Mission. Diu will be competing for one of the last 10 spots against 20 cities from across India. In April 2018, it was reported that the Diu Smart City has already become India's first city to run on 100 percent renewable energy during the daytime. == History == The town and district were historically part of the Saurashtra region of Gujarat and an important port on trade routes of Arabian sea of Indian Ocean. Due to its strategic importance, there was a Battle of Diu in 1509 between Portugal and a combined force of Mamluks, Venetians, the Ragusians, the Zamorin of Calicut, and the Sultan of Gujarat, Mahmud Begada. In 1513, the Portuguese tried to establish an outpost, but negotiations were unsuccessful. There were failed attempts by Diogo Lopes de Sequeira in 1521 and Nuno da Cunha in 1523. In 1531 the conquest attempted by D. Nuno da Cunha was unsuccessful. In 1535 Bahadur Shah, the Sultan of Gujarat, concluded a defensive alliance with the Portuguese against the Mughal emperor Humayun and allowed the Portuguese to construct the Diu Fort and maintain a garrison on the island. The alliance quickly unravelled, and attempts by the Sultans to oust the Portuguese from Diu between 1537 and 1546 failed. Bahadur Shah sought to recover Diu but was defeated and killed by the Portuguese, followed by a period of war between them and the people of Gujarat. In 1538, Coja Sofar, Lord of Cambay, together with the Ottoman Suleiman Pasha, came to lay siege to Diu and were defeated by Portuguese resistance led by Anthony Silveira. A second siege was imposed by the same Coja Sofar in 1546. It was repelled by the Portuguese conquerors, led on land by D. João Mascarenhas and at sea by D. João de Castro. Coja Sofar and D. Fernando de Castro, son of the Portuguese viceroy, perished in the struggle. The fortress, completed by Dom João de Castro after the siege of 1545, still stands. After this second siege, Diu was so fortified that it could withstand later attacks of the Arabs of Muscat and the Dutch in the late 17th century. From the 18th century, Diu declined in strategic importance (due to development of Bombay) and was reduced to a museum or historical landmark as a commercial and strategic bulwark in the struggle between the forces of the Islamic East and Christian West. Diu remained a possession of the Portuguese from 1535 until 1961, when it fell to troops of the Indian Union, who conquered all of former Portuguese India under Operation Vijay. The island was occupied by the Indian military on 19 December 1961. The Battle of Diu involved overwhelming land, sea and air strikes on the enclave for 48 hours until the Portuguese garrison there surrendered. It was declared a union territory of India, Goa, Daman, and Diu. Goa separated as a state in 1987; the remainder became union territory of Daman and Diu. On 26 January 2020, the union territories of Daman and Diu were merged with Dadra and Nagar Haveli to form the union territory of Dadra and Nagar Haveli and Daman and Diu. == Population == === Languages === The languages spoken in Diu include Gujarati, Portuguese, English and Hindi. === Demographics === As of the 2011 Census of India, Diu had a population of 23,991 spread over 5,249 households. Males constituted 48.4% of the population and females 51.6%. Diu had an average literacy rate of 92%, In Diu, 10% of the population is under 6 years of age.<sup>[''needs update'']</sup> == Geography and climate == Diu is at 20.71°N 70.98°E. The island is at sea level and covers an area of 38.8 square kilometres or 15.0 square miles. Diu has a hot semi-arid climate (Köppen ''BSh''), with an average annual rainfall of 560 millimetres or 22 inches, of which all but 25 millimetres (1.0 in) falls between June and September. == Education == * [[Diu College]] == Landmarks == With no tall buildings except the fort, the town of Diu has a characteristically low skyline and is known for its Portuguese architecture. Diu has a white sand beach to the north. === Forts === Diu Fort was built in 1535 and maintained an active garrison until 1960. The Diu fort is the most visited landmark in the district. The fort and the Basilica of Bom Jesus in Old Goa were chosen as the two wonders from India, among the seven from across the world, out of a list of 27 monuments built in 16 countries during the Portuguese rule. The fort is built on a hillock next to the sea. Fortim do Mar is a sea fort in the Diu channel between the island of Diu and the Gogolá peninsula. It has an iconic ship-shaped structure. === Churches === There are three surviving Portuguese Baroque church buildings, with St. Paul’s Church, completed in 1610, being the only one still in use for its intended purpose. The Church of St. Francis of Assisi (the first church built in Diu, in 1593) is now used as a hospital. St. Thomas' Church is used as a museum. === Chapels === There are several Chapels scattered in various parts of the town. Some of the prominent ones are: Mother of God Chapel, Our Lady of Rosary Chapel and the Bastion Chapels of the city wall and fort. == Transport == Diu is linked to the mainland by a bridge. Local transport is available by road from Una, Gujarat and Rajula and Mahuva. Alliance Air, an Air India subsidiary, flies from Mumbai, landing at Diu Airport. Jet Airways, also used to have services here until it was bankrupted in 2019. 03b8e21ee1397505c0165020fa508aa8d3038f4c Diu College 0 664 1354 2024-03-16T15:10:09Z 80.5.18.102 0 Created page with "'''Diu College''', is a general degree college situated in Diu. It was established in the year 2013. The college is affiliated with Saurashtra University. The college offers bachelor's degree courses in Science, Commerse and Arts." wikitext text/x-wiki '''Diu College''', is a general degree college situated in Diu. It was established in the year 2013. The college is affiliated with Saurashtra University. The college offers bachelor's degree courses in Science, Commerse and Arts. 344b1ca65f2b9d56e360d4c0fa9fec8eb90813e1 Mahatma Gandhi 0 665 1355 2024-03-16T17:07:11Z 80.5.18.102 0 Created page with "'''Mohandas Karamchand Gandhi''' (ISO: ''Mōhanadāsa Karamacaṁda Gāṁdhī''; 2 October 1869 – 30 January 1948) was an Indian [[lawyer]], anti-colonial nationalist and political ethicist who employed [[nonviolent]] resistance to lead the successful campaign for [[India's independence]] from [[British rule]]. He inspired movements for [[civil rights]] and [[freedom]] across the world. The honorific '''Mahātmā''' (from [[Sanskrit]] 'great-souled, venerable'), first..." wikitext text/x-wiki '''Mohandas Karamchand Gandhi''' (ISO: ''Mōhanadāsa Karamacaṁda Gāṁdhī''; 2 October 1869 – 30 January 1948) was an Indian [[lawyer]], anti-colonial nationalist and political ethicist who employed [[nonviolent]] resistance to lead the successful campaign for [[India's independence]] from [[British rule]]. He inspired movements for [[civil rights]] and [[freedom]] across the world. The honorific '''Mahātmā''' (from [[Sanskrit]] 'great-souled, venerable'), first applied to him in [[South Africa]] in 1914, is now used throughout the world. Born and raised in a Hindu family in coastal [[Gujarat]], Gandhi trained in the law at the Inner Temple in [[London]], and was called to the bar in June 1891, at the age of 22. After two uncertain years in India, where he was unable to start a successful law practice, he moved to [[South Africa]] in 1893 to represent an Indian merchant in a lawsuit. He went on to live in South Africa for 21 years. There, Gandhi raised a family and first employed nonviolent resistance in a campaign for civil rights. In 1915, aged 45, he returned to India and soon set about organising peasants, farmers, and urban labourers to protest against discrimination and excessive land-tax. Assuming leadership of the [[Indian National Congress]] in 1921, Gandhi led nationwide campaigns for easing poverty, expanding women's rights, building religious and ethnic amity, ending untouchability, and, above all, achieving ''swaraj'' or self-rule. Gandhi adopted the short ''dhoti'' woven with hand-spun yarn as a mark of identification with India's rural poor. He began to live in a self-sufficient residential community, to eat simple food, and undertake long fasts as a means of both introspection and political protest. Bringing anti-colonial nationalism to the common Indians, Gandhi led them in challenging the British-imposed salt tax with the 400 km (250 mi) [[Dandi Salt March]] in 1930 and in calling for the British to quit India in 1942. He was imprisoned many times and for many years in both South Africa and India. Gandhi's vision of an independent India based on religious pluralism was challenged in the early 1940s by a Muslim nationalism which demanded a separate homeland for Muslims within British India. In August 1947, Britain granted independence, but the British Indian Empire was partitioned into two dominions, a Hindu-majority [[India]] and a Muslim-majority [[Pakistan]]. As many displaced [[Hindus]], [[Muslims]], and [[Sikhs]] made their way to their new lands, religious violence broke out, especially in the [[Punjab]] and [[Bengal]]. Abstaining from the official celebration of independence, Gandhi visited the affected areas, attempting to alleviate distress. In the months following, he undertook several hunger strikes to stop the religious violence. The last of these was begun in Delhi on 12 January 1948, when he was 78. The belief that Gandhi had been too resolute in his defense of both Pakistan and Indian Muslims spread among some Hindus in India. Among these was Nathuram Godse, a militant Hindu nationalist from Pune, western India, who assassinated Gandhi by firing three bullets into his chest at an interfaith prayer meeting in Delhi on 30 January 1948. Gandhi's birthday, 2 October, is commemorated in India as Gandhi Jayanti, a national holiday, and worldwide as the International Day of Nonviolence. Gandhi is considered to be the Father of the Nation in post-colonial India. During India's nationalist movement and in several decades immediately after, he was also commonly called ''Bapu'' ([[Gujarati]] endearment for "father", roughly "papa", "daddy"). == Early life and background == === Parents === Gandhi's father, Karamchand Uttamchand Gandhi (1822–1885), served as the ''dewan'' (chief minister) of [[Porbandar state]]. His family originated from the then village of Kutiana in what was then [[Junagadh State|Junagadh State.]] Although he only had been a clerk in the state administration and had an elementary education, Karamchand proved a capable chief minister. During his tenure, Karamchand married four times. His first two wives died young, after each had given birth to a daughter, and his third marriage was childless. In 1857, he sought his third wife's permission to remarry; that year, he married Putlibai (1844–1891), who also came from Junagadh, and was from a Pranami Vaishnava family. Karamchand and Putlibai had four children: a son, Laxmidas (<abbr>c.</abbr> 1860–1914); a daughter, Raliatbehn (1862–1960); a second son, Karsandas (<abbr>c.</abbr> 1866–1913). and a third son, Mohandas Karamchand Gandhi who was born on 2 October 1869 in Porbandar (also known as ''Sudamapuri''), a coastal town on the Kathiawar Peninsula and then part of the small princely state of Porbandar in the Kathiawar Agency of the British Raj. In 1874, Gandhi's father Karamchand left Porbandar for the smaller state of Rajkot, where he became a counsellor to its ruler, the Thakur Sahib; though Rajkot was a less prestigious state than Porbandar, the British regional political agency was located there, which gave the state's ''diwan'' a measure of security. In 1876, Karamchand became ''diwan'' of Rajkot and was succeeded as ''diwan'' of Porbandar by his brother Tulsidas. His family then rejoined him in Rajkot. === Childhood === As a child, Gandhi was described by his sister Raliat as "restless as mercury, either playing or roaming about. One of his favourite pastimes was twisting dogs' ears." The Indian classics, especially the stories of Shravana and king Harishchandra, had a great impact on Gandhi in his childhood. In his autobiography, he states that they left an indelible impression on his mind. He writes: "It haunted me and I must have acted Harishchandra to myself times without number." Gandhi's early self-identification with truth and love as supreme values is traceable to these epic characters. The family's religious background was eclectic. Mohandas was born into a Gujarati Hindu Modh Bania family. Gandhi's father Karamchand was Hindu and his mother Putlibai was from a Pranami Vaishnava Hindu family. Gandhi's father was of Modh Baniya caste in the varna of Vaishya. His mother came from the medieval Krishna bhakti-based Pranami tradition, whose religious texts include the Bhagavad Gita, the ''Bhagavata Purana'', and a collection of 14 texts with teachings that the tradition believes to include the essence of the Vedas, the Quran and the Bible. Gandhi was deeply influenced by his mother, an extremely pious lady who "would not think of taking her meals without her daily prayers... she would take the hardest vows and keep them without flinching. To keep two or three consecutive fasts was nothing to her." At age 9, Gandhi entered the local school in Rajkot, near his home. There, he studied the rudiments of arithmetic, history, the Gujarati language and geography. At the age of 11, he joined the High School in Rajkot, Alfred High School. He was an average student, won some prizes, but was a shy and tongue tied student, with no interest in games; his only companions were books and school lessons. === Marriage === In May 1883, the 13-year-old Mohandas was married to 14-year-old Kasturbai Gokuldas Kapadia (her first name was usually shortened to "Kasturba", and affectionately to "Ba") in an arranged marriage, according to the custom of the region at that time. In the process, he lost a year at school but was later allowed to make up by accelerating his studies. His wedding was a joint event, where his brother and cousin were also married. Recalling the day of their marriage, he once said, "As we didn't know much about marriage, for us it meant only wearing new clothes, eating sweets and playing with relatives." As was the prevailing tradition, the adolescent bride was to spend much time at her parents' house, and away from her husband. Writing many years later, Mohandas described with regret the lustful feelings he felt for his young bride: "even at school I used to think of her, and the thought of nightfall and our subsequent meeting was ever haunting me." He later recalled feeling jealous and possessive of her, such as when she would visit a temple with her girlfriends, and being sexually lustful in his feelings for her. In late 1885, Gandhi's father Karamchand died. Gandhi, then 16 years old, and his wife of age 17 had their first baby, who survived only a few days. The two deaths anguished Gandhi. The Gandhi couple had four more children, all sons: Harilal, born in 1888; Manilal, born in 1892; Ramdas, born in 1897; and Devdas, born in 1900. In November 1887, the 18-year-old Gandhi graduated from high school in Ahmedabad. In January 1888, he enrolled at Samaldas College in Bhavnagar State, then the sole degree-granting institution of higher education in the region. However, he dropped out, and returned to his family in Porbandar. == Three years in London == === Student of law === Gandhi had dropped out of the cheapest college he could afford in Bombay. Mavji Dave Joshiji, a Brahmin priest and family friend, advised Gandhi and his family that he should consider law studies in London. In July 1888, his wife Kasturba gave birth to their first surviving son, Harilal. His mother was not comfortable about Gandhi leaving his wife and family, and going so far from home. Gandhi's uncle Tulsidas also tried to dissuade his nephew. Gandhi wanted to go. To persuade his wife and mother, Gandhi made a vow in front of his mother that he would abstain from meat, alcohol and women. Gandhi's brother Laxmidas, who was already a lawyer, cheered Gandhi's London studies plan and offered to support him. Putlibai gave Gandhi her permission and blessing. On 10 August 1888, Gandhi, aged 18, left Porbandar for Mumbai, then known as Bombay. Upon arrival, he stayed with the local Modh Bania community whose elders warned him that England would tempt him to compromise his religion, and eat and drink in Western ways. Despite Gandhi informing them of his promise to his mother and her blessings, he was excommunicated from his caste. Gandhi ignored this, and on 4 September, he sailed from Bombay to London, with his brother seeing him off. Gandhi attended University College, London, where he took classes in English literature with Henry Morley in 1888–1889. He also enrolled at the Inns of Court School of Law in Inner Temple with the intention of becoming a barrister. His childhood shyness and self-withdrawal had continued through his teens. He retained these traits when he arrived in London, but joined a public speaking practice group and overcame his shyness sufficiently to practise law. He demonstrated a keen interest in the welfare of London's impoverished dockland communities. In 1889, a bitter trade dispute broke out in London, with dockers striking for better pay and conditions, and seamen, shipbuilders, factory girls and other joining the strike in solidarity. The strikers were successful, in part due to the mediation of Cardinal Manning, leading Gandhi and an Indian friend to make a point of visiting the cardinal and thanking him for his work. === Vegetarianism and committee work === Gandhi's time in London was influenced by the vow he had made to his mother. He tried to adopt "English" customs, including taking dancing lessons. However, he did not appreciate the bland vegetarian food offered by his landlady and was frequently hungry until he found one of London's few vegetarian restaurants. Influenced by Henry Salt's writing, he joined the London Vegetarian Society, and was elected to its executive committee under the aegis of its president and benefactor Arnold Hills. An achievement while on the committee was the establishment of a Bayswater chapter. Some of the vegetarians he met were members of the Theosophical Society, which had been founded in 1875 to further universal brotherhood, and which was devoted to the study of Buddhist and Hindu literature. They encouraged Gandhi to join them in reading the Bhagavad Gita both in translation as well as in the original. Gandhi had a friendly and productive relationship with Hills, but the two men took a different view on the continued LVS membership of fellow committee member Thomas Allinson. Their disagreement is the first known example of Gandhi challenging authority, despite his shyness and temperamental disinclination towards confrontation. Allinson had been promoting newly available birth control methods, but Hills disapproved of these, believing they undermined public morality. He believed vegetarianism to be a moral movement and that Allinson should therefore no longer remain a member of the LVS. Gandhi shared Hills' views on the dangers of birth control, but defended Allinson's right to differ. It would have been hard for Gandhi to challenge Hills; Hills was 12 years his senior and unlike Gandhi, highly eloquent. He bankrolled the LVS and was a captain of industry with his Thames Ironworks company employing more than 6,000 people in the East End of London. He was also a highly accomplished sportsman who later founded the football club West Ham United. In his 1927 ''An Autobiography, Vol. I'', Gandhi wrote:<blockquote>The question deeply interested me...I had a high regard for Mr. Hills and his generosity. But I thought it was quite improper to exclude a man from a vegetarian society simply because he refused to regard puritan morals as one of the objects of the society</blockquote>A motion to remove Allinson was raised, and was debated and voted on by the committee. Gandhi's shyness was an obstacle to his defence of Allinson at the committee meeting. He wrote his views down on paper but shyness prevented him from reading out his arguments, so Hills, the President, asked another committee member to read them out for him. Although some other members of the committee agreed with Gandhi, the vote was lost and Allinson excluded. There were no hard feelings, with Hills proposing the toast at the LVS farewell dinner in honour of Gandhi's return to India. === Called to the bar === Gandhi, at age 22, was called to the bar in June 1891 and then left London for India, where he learned that his mother had died while he was in London and that his family had kept the news from him. His attempts at establishing a law practice in Bombay failed because he was psychologically unable to cross-examine witnesses. He returned to Rajkot to make a modest living drafting petitions for litigants, but he was forced to stop when he ran afoul of British officer Sam Sunny. In 1893, a Muslim merchant in Kathiawar named Dada Abdullah contacted Gandhi. Abdullah owned a large successful shipping business in South Africa. His distant cousin in Johannesburg needed a lawyer, and they preferred someone with Kathiawari heritage. Gandhi inquired about his pay for the work. They offered a total salary of £105 (~$4,143.31 2023 money) plus travel expenses. He accepted it, knowing that it would be at least a one-year commitment in the Colony of Natal, South Africa, also a part of the British Empire. == Civil rights activist in South Africa (1893–1914) == In April 1893, Gandhi, aged 23, set sail for South Africa to be the lawyer for Abdullah's cousin. He spent 21 years in South Africa, where he developed his political views, ethics and politics. Immediately upon arriving in South Africa, Gandhi faced discrimination because of his skin colour and heritage. He was not allowed to sit with European passengers in the stagecoach and told to sit on the floor near the driver, then beaten when he refused; elsewhere he was kicked into a gutter for daring to walk near a house, in another instance thrown off a train at Pietermaritzburg after refusing to leave the first-class. He sat in the train station, shivering all night and pondering if he should return to India or protest for his rights. He chose to protest and was allowed to board the train the next day. In another incident, the magistrate of a Durban court ordered Gandhi to remove his turban, which he refused to do. Indians were not allowed to walk on public footpaths in South Africa. Gandhi was kicked by a police officer out of the footpath onto the street without warning. When Gandhi arrived in South Africa, according to Herman, he thought of himself as "a Briton first, and an Indian second". However, the prejudice against him and his fellow Indians from British people that Gandhi experienced and observed deeply bothered him. He found it humiliating, struggling to understand how some people can feel honour or superiority or pleasure in such inhumane practices. Gandhi began to question his people's standing in the British Empire. The Abdullah case that had brought him to South Africa concluded in May 1894, and the Indian community organised a farewell party for Gandhi as he prepared to return to India. However, a new Natal government discriminatory proposal led to Gandhi extending his original period of stay in South Africa. He planned to assist Indians in opposing a bill to deny them the right to vote, a right then proposed to be an exclusive European right. He asked Joseph Chamberlain, the British Colonial Secretary, to reconsider his position on this bill. Though unable to halt the bill's passage, his campaign was successful in drawing attention to the grievances of Indians in South Africa. He helped found the Natal Indian Congress in 1894, and through this organisation, he moulded the Indian community of South Africa into a unified political force. In January 1897, when Gandhi landed in Durban, a mob of white settlers attacked him and he escaped only through the efforts of the wife of the police superintendent. However, he refused to press charges against any member of the mob. During the Boer War, Gandhi volunteered in 1900 to form a group of stretcher-bearers as the Natal Indian Ambulance Corps. According to Arthur Herman, Gandhi wanted to disprove the British colonial stereotype that Hindus were not fit for "manly" activities involving danger and exertion, unlike the Muslim "martial races". Gandhi raised eleven hundred Indian volunteers, to support British combat troops against the Boers. They were trained and medically certified to serve on the front lines. They were auxiliaries at the Battle of Colenso to a White volunteer ambulance corps. At the battle of Spion Kop Gandhi and his bearers moved to the front line and had to carry wounded soldiers for miles to a field hospital because the terrain was too rough for the ambulances. Gandhi and thirty-seven other Indians received the Queen's South Africa Medal. In 1906, the Transvaal government promulgated a new Act compelling registration of the colony's Indian and Chinese populations. At a mass protest meeting held in Johannesburg on 11 September that year, Gandhi adopted his still evolving methodology of ''Satyagraha'' (devotion to the truth), or nonviolent protest, for the first time. According to Anthony Parel, Gandhi was also influenced by the Tamil moral text ''Tirukkuṛaḷ'' after Leo Tolstoy mentioned it in their correspondence that began with "A Letter to a Hindu". Gandhi urged Indians to defy the new law and to suffer the punishments for doing so. Gandhi's ideas of protests, persuasion skills and public relations had emerged. He took these back to India in 1915. === Europeans, Indians and Africans === Gandhi focused his attention on Indians and Africans while he was in South Africa. He initially was not interested in politics. This changed, however, after he was discriminated against and bullied, such as by being thrown out of a train coach because of his skin colour by a white train official. After several such incidents with Whites in South Africa, Gandhi's thinking and focus changed, and he felt he must resist this and fight for rights. He entered politics by forming the Natal Indian Congress. According to Ashwin Desai and Goolam Vahed, Gandhi's views on racism are contentious in some cases. Gandhi suffered persecution from the beginning in South Africa. Like with other coloured people, white officials denied him his rights, and the press and those in the streets bullied and called him a "parasite", "semi-barbarous", "canker", "squalid coolie", "yellow man", and other epithets. People would spit on him as an expression of racial hate. While in South Africa, Gandhi focused on the racial persecution of Indians before he started to focus on racism against Africans. In some cases, state Desai and Vahed, his behaviour was one of being a willing part of racial stereotyping and African exploitation. During a speech in September 1896, Gandhi complained that the whites in the British colony of South Africa were "degrading the Indian to the level of a raw Kaffir". Scholars cite it as an example of evidence that Gandhi at that time thought of Indians and black South Africans differently. As another example given by Herman, Gandhi, at the age of 24, prepared a legal brief for the Natal Assembly in 1895, seeking voting rights for Indians. Gandhi cited race history and European Orientalists' opinions that "Anglo-Saxons and Indians are sprung from the same Aryan stock or rather the Indo-European peoples", and argued that Indians should not be grouped with the Africans. Years later, Gandhi and his colleagues served and helped Africans as nurses and by opposing racism. The Nobel Peace Prize winner Nelson Mandela is among admirers of Gandhi's efforts to fight against racism in Africa. The general image of Gandhi, state Desai and Vahed, has been reinvented since his assassination as though he was always a saint, when in reality his life was more complex, contained inconvenient truths, and was one that changed over time. Scholars have also pointed the evidence to a rich history of co-operation and efforts by Gandhi and Indian people with nonwhite South Africans against persecution of Africans and the Apartheid. In 1906, when the Bambatha Rebellion broke out in the colony of Natal, the then 36-year-old Gandhi, despite sympathising with the Zulu rebels, encouraged Indian South Africans to form a volunteer stretcher-bearer unit. Writing in the ''Indian Opinion'', Gandhi argued that military service would be beneficial to the Indian community and claimed it would give them "health and happiness". Gandhi eventually led a volunteer mixed unit of Indian and African stretcher-bearers to treat wounded combatants during the suppression of the rebellion. The medical unit commanded by Gandhi operated for less than two months before being disbanded. After the suppression of the rebellion, the colonial establishment showed no interest in extending to the Indian community the civil rights granted to white South Africans. This led Gandhi to becoming disillusioned with the Empire and aroused a spiritual awakening with him; historian Arthur L. Herman wrote that his African experience was a part of his great disillusionment with the West, transforming him into an "uncompromising non-cooperator". By 1910, Gandhi's newspaper, ''Indian Opinion'', was covering reports on discrimination against Africans by the colonial regime. Gandhi remarked that the Africans are "alone are the original inhabitants of the land. … The whites, on the other hand, have occupied the land forcibly and appropriated it to themselves." In 1910, Gandhi established, with the help of his friend Hermann Kallenbach, an idealistic community they named Tolstoy Farm near Johannesburg. There he nurtured his policy of peaceful resistance. In the years after black South Africans gained the right to vote in South Africa (1994), Gandhi was proclaimed a national hero with numerous monuments. == Struggle for Indian independence (1915–1947) == See also: Indian independence movement At the request of Gopal Krishna Gokhale, conveyed to him by C. F. Andrews, Gandhi returned to India in 1915. He brought an international reputation as a leading Indian nationalist, theorist and community organiser. Gandhi joined the Indian National Congress and was introduced to Indian issues, politics and the Indian people primarily by Gokhale. Gokhale was a key leader of the Congress Party best known for his restraint and moderation, and his insistence on working inside the system. Gandhi took Gokhale's liberal approach based on British Whiggish traditions and transformed it to make it look Indian. Gandhi took leadership of the Congress in 1920 and began escalating demands until on 26 January 1930 the Indian National Congress declared the independence of India. The British did not recognise the declaration but negotiations ensued, with the Congress taking a role in provincial government in the late 1930s. Gandhi and the Congress withdrew their support of the Raj when the Viceroy declared war on Germany in September 1939 without consultation. Tensions escalated until Gandhi demanded immediate independence in 1942 and the British responded by imprisoning him and tens of thousands of Congress leaders. Meanwhile, the Muslim League did co-operate with Britain and moved, against Gandhi's strong opposition, to demands for a totally separate Muslim state of Pakistan. In August 1947 the British partitioned the land with India and Pakistan each achieving independence on terms that Gandhi disapproved. === Role in World War I === See also: The role of India in World War I In April 1918, during the latter part of World War I, the Viceroy invited Gandhi to a War Conference in Delhi. Gandhi agreed to actively recruit Indians for the war effort. In contrast to the Zulu War of 1906 and the outbreak of World War I in 1914, when he recruited volunteers for the Ambulance Corps, this time Gandhi attempted to recruit combatants. In a June 1918 leaflet entitled "Appeal for Enlistment", Gandhi wrote "To bring about such a state of things we should have the ability to defend ourselves, that is, the ability to bear arms and to use them... If we want to learn the use of arms with the greatest possible despatch, it is our duty to enlist ourselves in the army." He did, however, stipulate in a letter to the Viceroy's private secretary that he "personally will not kill or injure anybody, friend or foe." Gandhi's war recruitment campaign brought into question his consistency on nonviolence. Gandhi's private secretary noted that "The question of the consistency between his creed of 'Ahimsa' (nonviolence) and his recruiting campaign was raised not only then but has been discussed ever since." According to political and educational scientist Christian Bartolf, Gandhi's support for the war stemmed from his belief that true ahimsa could not exist simultaneously with cowardice. Therefore, he felt that Indians needed to be willing and capable of using arms before they voluntarily chose non-violence. In July 1918, Gandhi admitted that he couldn't persuade even one individual to enlist for the world war. "So far I have not a single recruit to my credit apart," Gandhi wrote. He added: "They object because they fear to die." === Champaran agitations === Main article: Champaran Satyagraha Gandhi's first major achievement came in 1917 with the Champaran agitation in Bihar. The Champaran agitation pitted the local peasantry against largely Anglo-Indian plantation owners who were backed by the local administration. The peasants were forced to grow indigo (''Indigofera'' sp.), a cash crop for Indigo dye whose demand had been declining over two decades, and were forced to sell their crops to the planters at a fixed price. Unhappy with this, the peasantry appealed to Gandhi at his ashram in Ahmedabad. Pursuing a strategy of nonviolent protest, Gandhi took the administration by surprise and won concessions from the authorities. === Kheda agitations === Main article: Kheda Satyagraha In 1918, Kheda was hit by floods and famine and the peasantry was demanding relief from taxes. Gandhi moved his headquarters to Nadiad, organising scores of supporters and fresh volunteers from the region, the most notable being Vallabhbhai Patel. Using non-co-operation as a technique, Gandhi initiated a signature campaign where peasants pledged non-payment of revenue even under the threat of confiscation of land. A social boycott of ''mamlatdars'' and ''talatdars'' (revenue officials within the district) accompanied the agitation. Gandhi worked hard to win public support for the agitation across the country. For five months, the administration refused, but by the end of May 1918, the Government gave way on important provisions and relaxed the conditions of payment of revenue tax until the famine ended. In Kheda, Vallabhbhai Patel represented the farmers in negotiations with the British, who suspended revenue collection and released all the prisoners. === Khilafat movement === Main article: Khilafat Movement In 1919, following World War I, Gandhi (aged 49) sought political co-operation from Muslims in his fight against British imperialism by supporting the Ottoman Empire that had been defeated in the World War. Before this initiative of Gandhi, communal disputes and religious riots between Hindus and Muslims were common in British India, such as the riots of 1917–18. Gandhi had already vocally supported the British crown in the first world war. This decision of Gandhi was in part motivated by the British promise to reciprocate the help with ''swaraj'' (self-government) to Indians after the end of World War I. The British government had offered, instead of self-government, minor reforms instead, disappointing Gandhi. Gandhi announced his ''satyagraha'' (civil disobedience) intentions. The British colonial officials made their counter move by passing the Rowlatt Act, to block Gandhi's movement. The Act allowed the British government to treat civil disobedience participants as criminals and gave it the legal basis to arrest anyone for "preventive indefinite detention, incarceration without judicial review or any need for a trial". Gandhi felt that Hindu-Muslim co-operation was necessary for political progress against the British. He leveraged the Khilafat movement, wherein Sunni Muslims in India, their leaders such as the sultans of princely states in India and Ali brothers championed the Turkish Caliph as a solidarity symbol of Sunni Islamic community (''ummah''). They saw the Caliph as their means to support Islam and the Islamic law after the defeat of Ottoman Empire in World War I. Gandhi's support to the Khilafat movement led to mixed results. It initially led to a strong Muslim support for Gandhi. However, the Hindu leaders including Rabindranath Tagore questioned Gandhi's leadership because they were largely against recognising or supporting the Sunni Islamic Caliph in Turkey. The increasing Muslim support for Gandhi, after he championed the Caliph's cause, temporarily stopped the Hindu-Muslim communal violence. It offered evidence of inter-communal harmony in joint Rowlatt ''satyagraha'' demonstration rallies, raising Gandhi's stature as the political leader to the British. His support for the Khilafat movement also helped him sideline Muhammad Ali Jinnah, who had announced his opposition to the ''satyagraha'' non-co-operation movement approach of Gandhi. Jinnah began creating his independent support, and later went on to lead the demand for West and East Pakistan. Though they agreed in general terms on Indian independence, they disagreed on the means of achieving this. Jinnah was mainly interested in dealing with the British via constitutional negotiation, rather than attempting to agitate the masses. In 1922 the Khilafat movement gradually collapsed following the end of the non-cooperation movement with the arrest of Gandhi. A number of Muslim leaders and delegates abandoned Gandhi and Congress. Hindu-Muslim communal conflicts reignited. Deadly religious riots re-appeared in numerous cities, with 91 in United Provinces of Agra and Oudh alone. === Non-co-operation === Main article: Non-co-operation movement With his book ''Hind Swaraj'' (1909) Gandhi, aged 40, declared that British rule was established in India with the co-operation of Indians and had survived only because of this co-operation. If Indians refused to co-operate, British rule would collapse and ''swaraj'' (Indian independence) would come. In February 1919, Gandhi cautioned the Viceroy of India with a cable communication that if the British were to pass the Rowlatt Act, he would appeal to Indians to start civil disobedience. The British government ignored him and passed the law, stating it would not yield to threats. The ''satyagraha'' civil disobedience followed, with people assembling to protest the Rowlatt Act. On 30 March 1919, British law officers opened fire on an assembly of unarmed people, peacefully gathered, participating in ''satyagraha'' in Delhi. People rioted in retaliation. On 6 April 1919, a Hindu festival day, he asked a crowd to remember not to injure or kill British people, but to express their frustration with peace, to boycott British goods and burn any British clothing they owned. He emphasised the use of non-violence to the British and towards each other, even if the other side used violence. Communities across India announced plans to gather in greater numbers to protest. Government warned him to not enter Delhi. Gandhi defied the order. On 9 April, Gandhi was arrested. On 13 April 1919, people including women with children gathered in an Amritsar park, and British Indian Army officer Reginald Dyer surrounded them and ordered troops under his command to fire on them. The resulting Jallianwala Bagh massacre (or Amritsar massacre) of hundreds of Sikh and Hindu civilians enraged the subcontinent, but was supported by some Britons and parts of the British media as a necessary response. Gandhi in Ahmedabad, on the day after the massacre in Amritsar, did not criticise the British and instead criticised his fellow countrymen for not exclusively using 'love' to deal with the 'hate' of the British government. Gandhi demanded that the Indian people stop all violence, stop all property destruction, and went on fast-to-death to pressure Indians to stop their rioting. The massacre and Gandhi's non-violent response to it moved many, but also made some Sikhs and Hindus upset that Dyer was getting away with murder. Investigation committees were formed by the British, which Gandhi asked Indians to boycott. The unfolding events, the massacre and the British response, led Gandhi to the belief that Indians will never get a fair equal treatment under British rulers, and he shifted his attention to ''swaraj'' and political independence for India. In 1921, Gandhi was the leader of the Indian National Congress. He reorganised the Congress. With Congress now behind him, and Muslim support triggered by his backing the Khilafat movement to restore the Caliph in Turkey, Gandhi had the political support and the attention of the British Raj. Gandhi expanded his nonviolent non-co-operation platform to include the ''swadeshi'' policy – the boycott of foreign-made goods, especially British goods. Linked to this was his advocacy that ''khadi'' (homespun cloth) be worn by all Indians instead of British-made textiles. Gandhi exhorted Indian men and women, rich or poor, to spend time each day spinning ''khadi'' in support of the independence movement. In addition to boycotting British products, Gandhi urged the people to boycott British institutions and law courts, to resign from government employment, and to forsake British titles and honours. Gandhi thus began his journey aimed at crippling the British India government economically, politically and administratively. The appeal of "Non-cooperation" grew, its social popularity drew participation from all strata of Indian society. Gandhi was arrested on 10 March 1922, tried for sedition, and sentenced to six years' imprisonment. He began his sentence on 18 March 1922. With Gandhi isolated in prison, the Indian National Congress split into two factions, one led by Chitta Ranjan Das and Motilal Nehru favouring party participation in the legislatures, and the other led by Chakravarti Rajagopalachari and Sardar Vallabhbhai Patel, opposing this move. Furthermore, co-operation among Hindus and Muslims ended as Khilafat movement collapsed with the rise of Atatürk in Turkey. Muslim leaders left the Congress and began forming Muslim organisations. The political base behind Gandhi had broken into factions. Gandhi was released in February 1924 for an appendicitis operation, having served only two years. === Salt Satyagraha (Salt March) === Main article: Salt Satyagraha [[/wiki/File:Salt_March.ogv|thumb|Original footage of Gandhi and his followers marching to Dandi in the Salt Satyagraha]] After his early release from prison for political crimes in 1924, over the second half of the 1920s Gandhi continued to pursue ''swaraj''. He pushed through a resolution at the Calcutta Congress in December 1928 calling on the British government to grant India dominion status or face a new campaign of non-cooperation with complete independence for the country as its goal. After his support for World War I with Indian combat troops, and the failure of Khilafat movement in preserving the rule of Caliph in Turkey, followed by a collapse in Muslim support for his leadership, some such as Subhas Chandra Bose and Bhagat Singh questioned his values and non-violent approach. While many Hindu leaders championed a demand for immediate independence, Gandhi revised his own call to a one-year wait, instead of two. The British did not respond favourably to Gandhi's proposal. British political leaders such as Lord Birkenhead and Winston Churchill announced opposition to "the appeasers of Gandhi" in their discussions with European diplomats who sympathised with Indian demands. On 31 December 1929, an Indian flag was unfurled in Lahore. Gandhi led Congress in a celebration on 26 January 1930 of India's Independence Day in Lahore. This day was commemorated by almost every other Indian organisation. Gandhi then launched a new Satyagraha against the British salt tax in March 1930. Gandhi sent an ultimatum in the form of a letter personally addressed to Lord Irwin, the viceroy of India, on 2 March. Gandhi condemned British rule in the letter, describing it as "a curse" that "has impoverished the dumb millions by a system of progressive exploitation and by a ruinously expensive military and civil administration...It has reduced us politically to serfdom." Gandhi also mentioned in the letter that the viceroy received a salary "over five thousand times India's average income." In the letter, Gandhi also stressed his continued adherence to non-violent forms of protest. This was highlighted by the Salt March to Dandi from 12 March to 6 April, where, together with 78 volunteers, he marched 388 kilometres (241 mi) from Ahmedabad to Dandi, Gujarat to make salt himself, with the declared intention of breaking the salt laws. The march took 25 days to cover 240 miles with Gandhi speaking to often huge crowds along the way. Thousands of Indians joined him in Dandi. On 5 May he was interned under a regulation dating from 1827 in anticipation of a protest that he had planned. The protest at Dharasana salt works on 21 May went ahead without him see. A horrified American journalist, Webb Miller, described the British response thus:<blockquote>In complete silence the Gandhi men drew up and halted a hundred yards from the stockade. A picked column advanced from the crowd, waded the ditches and approached the barbed wire stockade... at a word of command, scores of native policemen rushed upon the advancing marchers and rained blows on their heads with their steel-shot lathis [long bamboo sticks]. Not one of the marchers even raised an arm to fend off blows. They went down like ninepins. From where I stood I heard the sickening whack of the clubs on unprotected skulls... Those struck down fell sprawling, unconscious or writhing with fractured skulls or broken shoulders.</blockquote>This went on for hours until some 300 or more protesters had been beaten, many seriously injured and two killed. At no time did they offer any resistance. This campaign was one of his most successful at upsetting British hold on India; Britain responded by imprisoning over 60,000 people. Congress estimates, however, put the figure at 90,000. Among them was one of Gandhi's lieutenants, Jawaharlal Nehru. According to Sarma, Gandhi recruited women to participate in the salt tax campaigns and the boycott of foreign products, which gave many women a new self-confidence and dignity in the mainstream of Indian public life. However, other scholars such as Marilyn French state that Gandhi barred women from joining his civil disobedience movement because he feared he would be accused of using women as a political shield. When women insisted on joining the movement and participating in public demonstrations, Gandhi asked the volunteers to get permissions of their guardians and only those women who can arrange child-care should join him. Regardless of Gandhi's apprehensions and views, Indian women joined the Salt March by the thousands to defy the British salt taxes and monopoly on salt mining. After Gandhi's arrest, the women marched and picketed shops on their own, accepting violence and verbal abuse from British authorities for the cause in the manner Gandhi inspired. === Gandhi as folk hero === Indian Congress in the 1920s appealed to Andhra Pradesh peasants by creating Telugu language plays that combined Indian mythology and legends, linked them to Gandhi's ideas, and portrayed Gandhi as a messiah, a reincarnation of ancient and medieval Indian nationalist leaders and saints. The plays built support among peasants steeped in traditional Hindu culture, according to Murali, and this effort made Gandhi a folk hero in Telugu speaking villages, a sacred messiah-like figure. According to Dennis Dalton, it was Gandhi's ideas that were responsible for his wide following. Gandhi criticised Western civilisation as one driven by "brute force and immorality", contrasting it with his categorisation of Indian civilisation as one driven by "soul force and morality". Gandhi captured the imagination of the people of his heritage with his ideas about winning "hate with love". These ideas are evidenced in his pamphlets from the 1890s, in South Africa, where too he was popular among the Indian indentured workers. After he returned to India, people flocked to him because he reflected their values. Gandhi also campaigned hard going from one rural corner of the Indian subcontinent to another. He used terminology and phrases such as ''Rama-rajya'' from ''Ramayana'', Prahlada as a paradigmatic icon, and such cultural symbols as another facet of ''swaraj'' and ''satyagraha''. During his lifetime, these ideas sounded strange outside India, but they readily and deeply resonated with the culture and historic values of his people. === Negotiations === The government, represented by Lord Irwin, decided to negotiate with Gandhi. The Gandhi–Irwin Pact was signed in March 1931. The British Government agreed to free all political prisoners, in return for the suspension of the civil disobedience movement. According to the pact, Gandhi was invited to attend the Round Table Conference in London for discussions and as the sole representative of the Indian National Congress. The conference was a disappointment to Gandhi and the nationalists. Gandhi expected to discuss India's independence, while the British side focused on the Indian princes and Indian minorities rather than on a transfer of power. Lord Irwin's successor, Lord Willingdon, took a hard line against India as an independent nation, began a new campaign of controlling and subduing the nationalist movement. Gandhi was again arrested, and the government tried and failed to negate his influence by completely isolating him from his followers. In Britain, Winston Churchill, a prominent Conservative politician who was then out of office but later became its prime minister, became a vigorous and articulate critic of Gandhi and opponent of his long-term plans. Churchill often ridiculed Gandhi, saying in a widely reported 1931 speech:<blockquote>It is alarming and also nauseating to see Mr Gandhi, a seditious Middle Temple lawyer, now posing as a fakir of a type well known in the East, striding half-naked up the steps of the Vice-regal palace....to parley on equal terms with the representative of the King-Emperor.</blockquote>Churchill's bitterness against Gandhi grew in the 1930s. He called Gandhi as the one who was "seditious in aim" whose evil genius and multiform menace was attacking the British empire. Churchill called him a dictator, a "Hindu Mussolini", fomenting a race war, trying to replace the Raj with Brahmin cronies, playing on the ignorance of Indian masses, all for selfish gain. Churchill attempted to isolate Gandhi, and his criticism of Gandhi was widely covered by European and American press. It gained Churchill sympathetic support, but it also increased support for Gandhi among Europeans. The developments heightened Churchill's anxiety that the "British themselves would give up out of pacifism and misplaced conscience". === Round Table Conferences === During the discussions between Gandhi and the British government over 1931–32 at the Round Table Conferences, Gandhi, now aged about 62, sought constitutional reforms as a preparation to the end of colonial British rule, and begin the self-rule by Indians. The British side sought reforms that would keep the Indian subcontinent as a colony. The British negotiators proposed constitutional reforms on a British Dominion model that established separate electorates based on religious and social divisions. The British questioned the Congress party and Gandhi's authority to speak for all of India. They invited Indian religious leaders, such as Muslims and Sikhs, to press their demands along religious lines, as well as B. R. Ambedkar as the representative leader of the untouchables. Gandhi vehemently opposed a constitution that enshrined rights or representations based on communal divisions, because he feared that it would not bring people together but divide them, perpetuate their status, and divert the attention from India's struggle to end the colonial rule. The Second Round Table conference was the only time he left India between 1914 and his death in 1948. He declined the government's offer of accommodation in an expensive West End hotel, preferring to stay in the East End, to live among working-class people, as he did in India. He based himself in a small cell-bedroom at Kingsley Hall for the three-month duration of his stay and was enthusiastically received by East Enders. During this time he renewed his links with the British vegetarian movement. After Gandhi returned from the Second Round Table conference, he started a new ''satyagraha''. He was arrested and imprisoned at the Yerwada Jail, Pune. While he was in prison, the British government enacted a new law that granted untouchables a separate electorate. It came to be known as the Communal Award. In protest, Gandhi started a fast-unto-death, while he was held in prison. The resulting public outcry forced the government, in consultations with Ambedkar, to replace the Communal Award with a compromise Poona Pact. === Congress politics === In 1934 Gandhi resigned from Congress party membership. He did not disagree with the party's position but felt that if he resigned, his popularity with Indians would cease to stifle the party's membership, which actually varied, including communists, socialists, trade unionists, students, religious conservatives, and those with pro-business convictions, and that these various voices would get a chance to make themselves heard. Gandhi also wanted to avoid being a target for Raj propaganda by leading a party that had temporarily accepted political accommodation with the Raj. Gandhi returned to active politics again in 1936, with the Nehru presidency and the Lucknow session of the Congress. Although Gandhi wanted a total focus on the task of winning independence and not speculation about India's future, he did not restrain the Congress from adopting socialism as its goal. Gandhi had a clash with Subhas Chandra Bose, who had been elected president in 1938, and who had previously expressed a lack of faith in nonviolence as a means of protest. Despite Gandhi's opposition, Bose won a second term as Congress President, against Gandhi's nominee, Bhogaraju Pattabhi Sitaramayya. Gandhi declared that Sitaramayya's defeat was his defeat. Bose later left the Congress when the All-India leaders resigned en masse in protest of his abandonment of the principles introduced by Gandhi. === World War II and ''Quit India movement'' === Main article: Quit India Movement Gandhi opposed providing any help to the British war effort and he campaigned against any Indian participation in World War II. The British government responded with the arrests of Gandhi and many other Congress leaders and killed over 1,000 Indians who participated in this movement. A number of violent attacks were also carried out by the nationalists against the British government. While Gandhi's campaign did not enjoy the support of a number of Indian leaders, and over 2.5 million Indians volunteered and joined the British military to fight on various fronts of the Allied Forces, the movement played a role in weakening the control over the South Asian region by the British regime and it ultimately paved the way for Indian independence. Gandhi's opposition to the Indian participation in World War II was motivated by his belief that India could not be party to a war ostensibly being fought for democratic freedom while that freedom was denied to India itself. He also condemned Nazism and Fascism, a view which won endorsement of other Indian leaders. As the war progressed, Gandhi intensified his demand for independence, calling for the British to ''Quit India'' in a 1942 speech in Mumbai. This was Gandhi's and the Congress Party's most definitive revolt aimed at securing the British exit from India. The British government responded quickly to the Quit India speech, and within hours after Gandhi's speech arrested Gandhi and all the members of the Congress Working Committee. His countrymen retaliated the arrests by damaging or burning down hundreds of government owned railway stations, police stations, and cutting down telegraph wires. In 1942, Gandhi now nearing age 73, urged his people to completely stop co-operating with the imperial government. In this effort, he urged that they neither kill nor injure British people, but be willing to suffer and die if violence is initiated by the British officials. He clarified that the movement would not be stopped because of any individual acts of violence, saying that the ''"ordered anarchy"'' of ''"the present system of administration"'' was ''"worse than real anarchy."'' He urged Indians to ''karo ya maro'' ("do or die") in the cause of their rights and freedoms. Gandhi's arrest lasted two years, as he was held in the Aga Khan Palace in Pune. During this period, his long time secretary Mahadev Desai died of a heart attack, his wife Kasturba died after 18 months' imprisonment on 22 February 1944; and Gandhi suffered a severe malaria attack. While in jail, he agreed to an interview with Stuart Gelder, a British journalist. Gelder then composed and released an interview summary, cabled it to the mainstream press, that announced sudden concessions Gandhi was willing to make, comments that shocked his countrymen, the Congress workers and even Gandhi. The latter two claimed that it distorted what Gandhi actually said on a range of topics and falsely repudiated the Quit India movement. Gandhi was released before the end of the war on 6 May 1944 because of his failing health and necessary surgery; the Raj did not want him to die in prison and enrage the nation. He came out of detention to an altered political scene – the Muslim League for example, which a few years earlier had appeared marginal, "now occupied the centre of the political stage" and the topic of Jinnah's campaign for Pakistan was a major talking point. Gandhi and Jinnah had extensive correspondence and the two men met several times over a period of two weeks in September 1944 at Jinnah's house in Bombay, where Gandhi insisted on a united religiously plural and independent India which included Muslims and non-Muslims of the Indian subcontinent coexisting. Jinnah rejected this proposal and insisted instead for partitioning the subcontinent on religious lines to create a separate Muslim homeland (later Pakistan). These discussions continued through 1947. While the leaders of Congress languished in jail, the other parties supported the war and gained organisational strength. Underground publications flailed at the ruthless suppression of Congress, but it had little control over events. At the end of the war, the British gave clear indications that power would be transferred to Indian hands. At this point Gandhi called off the struggle, and around 100,000 political prisoners were released, including the Congress's leadership. === Partition and independence === See also: Indian independence movement and Partition of India Gandhi opposed the partition of the Indian subcontinent along religious lines. The Indian National Congress and Gandhi called for the British to Quit India. However, the All-India Muslim League demanded "Divide and Quit India". Gandhi suggested an agreement which required the Congress and the Muslim League to co-operate and attain independence under a provisional government, thereafter, the question of partition could be resolved by a plebiscite in the districts with a Muslim majority. Jinnah rejected Gandhi's proposal and called for Direct Action Day, on 16 August 1946, to press Muslims to publicly gather in cities and support his proposal for the partition of the Indian subcontinent into a Muslim state and non-Muslim state. Huseyn Shaheed Suhrawardy, the Muslim League Chief Minister of Bengal – now Bangladesh and West Bengal, gave Calcutta's police special holiday to celebrate the Direct Action Day. The Direct Action Day triggered a mass murder of Calcutta Hindus and the torching of their property, and holidaying police were missing to contain or stop the conflict. The British government did not order its army to move in to contain the violence. The violence on Direct Action Day led to retaliatory violence against Muslims across India. Thousands of Hindus and Muslims were murdered, and tens of thousands were injured in the cycle of violence in the days that followed. Gandhi visited the most riot-prone areas to appeal a stop to the massacres. Archibald Wavell, the Viceroy and Governor-General of British India for three years through February 1947, had worked with Gandhi and Jinnah to find a common ground, before and after accepting Indian independence in principle. Wavell condemned Gandhi's character and motives as well as his ideas. Wavell accused Gandhi of harbouring the single minded idea to "overthrow British rule and influence and to establish a Hindu raj", and called Gandhi a "malignant, malevolent, exceedingly shrewd" politician. Wavell feared a civil war on the Indian subcontinent, and doubted Gandhi would be able to stop it. The British reluctantly agreed to grant independence to the people of the Indian subcontinent, but accepted Jinnah's proposal of partitioning the land into Pakistan and India. Gandhi was involved in the final negotiations, but Stanley Wolpert states the "plan to carve up British India was never approved of or accepted by Gandhi". The partition was controversial and violently disputed. More than half a million were killed in religious riots as 10 million to 12 million non-Muslims (Hindus and Sikhs mostly) migrated from Pakistan into India, and Muslims migrated from India into Pakistan, across the newly created borders of India, West Pakistan and East Pakistan. Gandhi spent the day of independence not celebrating the end of the British rule but appealing for peace among his countrymen by fasting and spinning in Calcutta on 15 August 1947. The partition had gripped the Indian subcontinent with religious violence and the streets were filled with corpses. Gandhi's fasting and protests are credited for stopping the religious riots and communal violence. == Death == Main article: Assassination of Mahatma Gandhi At 5:17 pm on 30 January 1948, Gandhi was with his grandnieces in the garden of Birla House (now Gandhi Smriti), on his way to address a prayer meeting, when Nathuram Godse, a Hindu nationalist, fired three bullets into his chest from a pistol at close range. According to some accounts, Gandhi died instantly. In other accounts, such as one prepared by an eyewitness journalist, Gandhi was carried into the Birla House, into a bedroom. There he died about 30 minutes later as one of Gandhi's family members read verses from Hindu scriptures. Prime Minister Jawaharlal Nehru addressed his countrymen over the All-India Radio saying:<blockquote>Friends and comrades, the light has gone out of our lives, and there is darkness everywhere, and I do not quite know what to tell you or how to say it. Our beloved leader, Bapu as we called him, the father of the nation, is no more. Perhaps I am wrong to say that; nevertheless, we will not see him again, as we have seen him for these many years, we will not run to him for advice or seek solace from him, and that is a terrible blow, not only for me, but for millions and millions in this country.</blockquote>Godse, a Hindu nationalist, with links to the Hindu Mahasabha and the Rashtriya Swayamsevak Sangh, made no attempt to escape; several other conspirators were soon arrested as well. The accused were Nathuram Vinayak Godse, Narayan Apte, Vinayak Damodar Savarkar, Shankar Kistayya, Dattatraya Parchure, Vishnu Karkare, Madanlal Pahwa, and Gopal Godse. The trial began on 27 May 1948 and ran for eight months before Justice Atma Charan passed his final order on 10 February 1949. The prosecution called 149 witnesses, the defense none. The court found all of the defendants except one guilty as charged. Eight men were convicted for the murder conspiracy, and others were convicted for violation of the Explosive Substances Act. Savarkar was acquitted and set free. Nathuram Godse and Narayan Apte were sentenced to death by hanging and the remaining six (including Godse's brother, Gopal) were sentenced to life imprisonment. === Funeral and memorials === Gandhi's death was mourned nationwide. Over a million people joined the five-mile-long funeral procession that took over five hours to reach Raj Ghat from Birla house, where he was assassinated, and another million watched the procession pass by. Gandhi's body was transported on a weapons carrier, whose chassis was dismantled overnight to allow a high-floor to be installed so that people could catch a glimpse of his body. The engine of the vehicle was not used; instead four drag-ropes held by 50 people each pulled the vehicle. All Indian-owned establishments in London remained closed in mourning as thousands of people from all faiths and denominations and Indians from all over Britain converged at India House in London. Gandhi was cremated in accordance with Hindu tradition. His ashes were poured into urns which were sent across India for memorial services. Most of the ashes were immersed at the Sangam at Allahabad on 12 February 1948, but some were secretly taken away. In 1997, Tushar Gandhi immersed the contents of one urn, found in a bank vault and reclaimed through the courts, at the Sangam at Allahabad. Some of Gandhi's ashes were scattered at the source of the Nile River near Jinja, Uganda, and a memorial plaque marks the event. On 30 January 2008, the contents of another urn were immersed at Girgaum Chowpatty. Another urn is at the palace of the Aga Khan in Pune (where Gandhi was held as a political prisoner from 1942 to 1944) and another in the Self-Realization Fellowship Lake Shrine in Los Angeles. The Birla House site where Gandhi was assassinated is now a memorial called Gandhi Smriti. The place near Yamuna river where he was cremated is the Rāj Ghāt memorial in New Delhi. A black marble platform, it bears the epigraph "Hē Rāma" (Devanagari: ''हे ! राम'' or, ''Hey Raam''). These are said to be Gandhi's last words after he was shot. == Principles, practices, and beliefs == Main article: Practices and beliefs of Mahatma Gandhi See also: Gandhism Gandhi's statements, letters and life have attracted much political and scholarly analysis of his principles, practices and beliefs, including what influenced him. Some writers present him as a paragon of ethical living and pacifism, while others present him as a more complex, contradictory and evolving character influenced by his culture and circumstances. === Truth and Satyagraha === Gandhi dedicated his life to discovering and pursuing truth, or ''Satya'', and called his movement satyagraha, which means "appeal to, insistence on, or reliance on the Truth". The first formulation of the ''satyagraha'' as a political movement and principle occurred in 1920, which he tabled as "Resolution on Non-cooperation" in September that year before a session of the Indian Congress. It was the ''satyagraha'' formulation and step, states Dennis Dalton, that deeply resonated with beliefs and culture of his people, embedded him into the popular consciousness, transforming him quickly into Mahatma. Gandhi based ''Satyagraha'' on the Vedantic ideal of self-realisation, ahimsa (nonviolence), vegetarianism, and universal love. William Borman states that the key to his ''satyagraha'' is rooted in the Hindu Upanishadic texts. According to Indira Carr, Gandhi's ideas on ''ahimsa'' and ''satyagraha'' were founded on the philosophical foundations of Advaita Vedanta. I. Bruce Watson states that some of these ideas are found not only in traditions within Hinduism, but also in Jainism or Buddhism, particularly those about non-violence, vegetarianism and universal love, but Gandhi's synthesis was to politicise these ideas. Gandhi's concept of ''satya'' as a civil movement, states Glyn Richards, are best understood in the context of the Hindu terminology of Dharma and ''Ṛta''. Gandhi stated that the most important battle to fight was overcoming his own demons, fears, and insecurities. Gandhi summarised his beliefs first when he said "God is Truth". He would later change this statement to "Truth is God". Thus, ''satya'' (truth) in Gandhi's philosophy is "God". Gandhi, states Richards, described the term "God" not as a separate power, but as the Being (Brahman, Atman) of the Advaita Vedanta tradition, a nondual universal that pervades in all things, in each person and all life. According to Nicholas Gier, this to Gandhi meant the unity of God and humans, that all beings have the same one soul and therefore equality, that ''atman'' exists and is same as everything in the universe, ahimsa (non-violence) is the very nature of this ''atman''. The essence of Satyagraha is "soul force" as a political means, refusing to use brute force against the oppressor, seeking to eliminate antagonisms between the oppressor and the oppressed, aiming to transform or "purify" the oppressor. It is not inaction but determined passive resistance and non-co-operation where, states Arthur Herman, "love conquers hate". A euphemism sometimes used for Satyagraha is that it is a "silent force" or a "soul force" (a term also used by Martin Luther King Jr. during his "I Have a Dream" speech). It arms the individual with moral power rather than physical power. Satyagraha is also termed a "universal force", as it essentially "makes no distinction between kinsmen and strangers, young and old, man and woman, friend and foe." Gandhi wrote: "There must be no impatience, no barbarity, no insolence, no undue pressure. If we want to cultivate a true spirit of democracy, we cannot afford to be intolerant. Intolerance betrays want of faith in one's cause." Civil disobedience and non-co-operation as practised under Satyagraha are based on the "law of suffering", a doctrine that ''the endurance of suffering is a means to an end''. This end usually implies a moral upliftment or progress of an individual or society. Therefore, non-co-operation in Satyagraha is in fact a means to secure the co-operation of the opponent consistently with truth and justice. While Gandhi's idea of ''satyagraha'' as a political means attracted a widespread following among Indians, the support was not universal. For example, Muslim leaders such as Jinnah opposed the ''satyagraha'' idea, accused Gandhi to be reviving Hinduism through political activism, and began effort to counter Gandhi with Muslim nationalism and a demand for Muslim homeland. The untouchability leader Ambedkar, in June 1945, after his decision to convert to Buddhism and the first Law and Justice minister of modern India, dismissed Gandhi's ideas as loved by "blind Hindu devotees", primitive, influenced by spurious brew of Tolstoy and Ruskin, and "there is always some simpleton to preach them". Winston Churchill caricatured Gandhi as a "cunning huckster" seeking selfish gain, an "aspiring dictator", and an "atavistic spokesman of a pagan Hinduism". Churchill stated that the civil disobedience movement spectacle of Gandhi only increased "the danger to which white people there [British India] are exposed". === Nonviolence === Although Gandhi was not the originator of the principle of nonviolence, he was the first to apply it in the political field on a large scale. The concept of nonviolence (''ahimsa'') has a long history in Indian religious thought, and is considered the highest dharma (ethical value/virtue), a precept to be observed towards all living beings (''sarvbhuta''), at all times (''sarvada''), in all respects (''sarvatha''), in action, words and thought. Gandhi explains his philosophy and ideas about ''ahimsa'' as a political means in his autobiography ''The Story of My Experiments with Truth''. Even though Gandhi considered non-violence to be "infinitely superior to violence", he preferred violence to cowardice. He added that he "would rather have India resort to arms in order to defend her honor than that she should in a cowardly manner become or remain a helpless witness to her own dishonor". == Literary works == Gandhi was a prolific writer. His signature style was simple, precise, clear and as devoid of artificialities. One of Gandhi's earliest publications, ''Hind Swaraj'', published in Gujarati in 1909, became "the intellectual blueprint" for India's independence movement. The book was translated into English the next year, with a copyright legend that read "No Rights Reserved". For decades he edited several newspapers including ''Harijan'' in Gujarati, in Hindi and in the English language; ''Indian Opinion'' while in South Africa and, ''Young India'', in English, and ''Navajivan'', a Gujarati monthly, on his return to India. Later, ''Navajivan'' was also published in Hindi. In addition, he wrote letters almost every day to individuals and newspapers. Gandhi also wrote several books including his autobiography, ''The Story of My Experiments with Truth (Gujarātī "સત્યના પ્રયોગો અથવા આત્મકથા")'', of which he bought the entire first edition to make sure it was reprinted. His other autobiographies included: ''Satyagraha in South Africa'' about his struggle there, ''Hind Swaraj or Indian Home Rule'', a political pamphlet, and a paraphrase in Gujarati of John Ruskin's ''Unto This Last'' which was an early critique of political economy. This last essay can be considered his programme on economics. He also wrote extensively on vegetarianism, diet and health, religion, social reforms, etc. Gandhi usually wrote in Gujarati, though he also revised the Hindi and English translations of his books. In 1934, he wrote ''Songs from Prison'' while prisoned in Yerawada jail in Maharashtra. Gandhi's complete works were published by the Indian government under the name ''The Collected Works of Mahatma Gandhi'' in the 1960s. The writings comprise about 50,000 pages published in about a hundred volumes. In 2000, a revised edition of the complete works sparked a controversy, as it contained a large number of errors and omissions. The Indian government later withdrew the revised edition. f2b4b5cd440021a36d7d784e45f1535c0cdb57b4 1356 1355 2024-03-16T17:16:18Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Mahatma Gandhi''' |- ! image | File:Mahatma-Gandhi,_studio,_1931.jpg |- ! birth name | Mohandas Karamchand Gandhi |- ! born | 2 October 1869 |- ! place of birth | Porbandar, Gujarat, British India |- ! died | 30 January 1948 (aged 78) |- ! place of death | New Delhi, India |- ! nationality | Indian |- ! alma_mater | University College London (UCL) |- ! occupation | Lawyer, Politician, Activist |- ! years_active | 1893–1948 |- ! known_for | Leading the Indian independence movement against British rule |} </div> '''Mohandas Karamchand Gandhi''' (ISO: ''Mōhanadāsa Karamacaṁda Gāṁdhī''; 2 October 1869 – 30 January 1948) was an Indian [[lawyer]], anti-colonial nationalist and political ethicist who employed [[nonviolent]] resistance to lead the successful campaign for [[India's independence]] from [[British rule]]. He inspired movements for [[civil rights]] and [[freedom]] across the world. The honorific '''Mahātmā''' (from [[Sanskrit]] 'great-souled, venerable'), first applied to him in [[South Africa]] in 1914, is now used throughout the world. Born and raised in a Hindu family in coastal [[Gujarat]], Gandhi trained in the law at the Inner Temple in [[London]], and was called to the bar in June 1891, at the age of 22. After two uncertain years in India, where he was unable to start a successful law practice, he moved to [[South Africa]] in 1893 to represent an Indian merchant in a lawsuit. He went on to live in South Africa for 21 years. There, Gandhi raised a family and first employed nonviolent resistance in a campaign for civil rights. In 1915, aged 45, he returned to India and soon set about organising peasants, farmers, and urban labourers to protest against discrimination and excessive land-tax. Assuming leadership of the [[Indian National Congress]] in 1921, Gandhi led nationwide campaigns for easing poverty, expanding women's rights, building religious and ethnic amity, ending untouchability, and, above all, achieving ''swaraj'' or self-rule. Gandhi adopted the short ''dhoti'' woven with hand-spun yarn as a mark of identification with India's rural poor. He began to live in a self-sufficient residential community, to eat simple food, and undertake long fasts as a means of both introspection and political protest. Bringing anti-colonial nationalism to the common Indians, Gandhi led them in challenging the British-imposed salt tax with the 400 km (250 mi) [[Dandi Salt March]] in 1930 and in calling for the British to quit India in 1942. He was imprisoned many times and for many years in both South Africa and India. Gandhi's vision of an independent India based on religious pluralism was challenged in the early 1940s by a Muslim nationalism which demanded a separate homeland for Muslims within British India. In August 1947, Britain granted independence, but the British Indian Empire was partitioned into two dominions, a Hindu-majority [[India]] and a Muslim-majority [[Pakistan]]. As many displaced [[Hindus]], [[Muslims]], and [[Sikhs]] made their way to their new lands, religious violence broke out, especially in the [[Punjab]] and [[Bengal]]. Abstaining from the official celebration of independence, Gandhi visited the affected areas, attempting to alleviate distress. In the months following, he undertook several hunger strikes to stop the religious violence. The last of these was begun in Delhi on 12 January 1948, when he was 78. The belief that Gandhi had been too resolute in his defense of both Pakistan and Indian Muslims spread among some Hindus in India. Among these was Nathuram Godse, a militant Hindu nationalist from Pune, western India, who assassinated Gandhi by firing three bullets into his chest at an interfaith prayer meeting in Delhi on 30 January 1948. Gandhi's birthday, 2 October, is commemorated in India as Gandhi Jayanti, a national holiday, and worldwide as the International Day of Nonviolence. Gandhi is considered to be the Father of the Nation in post-colonial India. During India's nationalist movement and in several decades immediately after, he was also commonly called ''Bapu'' ([[Gujarati]] endearment for "father", roughly "papa", "daddy"). == Early life and background == === Parents === Gandhi's father, Karamchand Uttamchand Gandhi (1822–1885), served as the ''dewan'' (chief minister) of [[Porbandar state]]. His family originated from the then village of Kutiana in what was then [[Junagadh State|Junagadh State.]] Although he only had been a clerk in the state administration and had an elementary education, Karamchand proved a capable chief minister. During his tenure, Karamchand married four times. His first two wives died young, after each had given birth to a daughter, and his third marriage was childless. In 1857, he sought his third wife's permission to remarry; that year, he married Putlibai (1844–1891), who also came from Junagadh, and was from a Pranami Vaishnava family. Karamchand and Putlibai had four children: a son, Laxmidas (<abbr>c.</abbr> 1860–1914); a daughter, Raliatbehn (1862–1960); a second son, Karsandas (<abbr>c.</abbr> 1866–1913). and a third son, Mohandas Karamchand Gandhi who was born on 2 October 1869 in Porbandar (also known as ''Sudamapuri''), a coastal town on the Kathiawar Peninsula and then part of the small princely state of Porbandar in the Kathiawar Agency of the British Raj. In 1874, Gandhi's father Karamchand left Porbandar for the smaller state of Rajkot, where he became a counsellor to its ruler, the Thakur Sahib; though Rajkot was a less prestigious state than Porbandar, the British regional political agency was located there, which gave the state's ''diwan'' a measure of security. In 1876, Karamchand became ''diwan'' of Rajkot and was succeeded as ''diwan'' of Porbandar by his brother Tulsidas. His family then rejoined him in Rajkot. === Childhood === As a child, Gandhi was described by his sister Raliat as "restless as mercury, either playing or roaming about. One of his favourite pastimes was twisting dogs' ears." The Indian classics, especially the stories of Shravana and king Harishchandra, had a great impact on Gandhi in his childhood. In his autobiography, he states that they left an indelible impression on his mind. He writes: "It haunted me and I must have acted Harishchandra to myself times without number." Gandhi's early self-identification with truth and love as supreme values is traceable to these epic characters. The family's religious background was eclectic. Mohandas was born into a Gujarati Hindu Modh Bania family. Gandhi's father Karamchand was Hindu and his mother Putlibai was from a Pranami Vaishnava Hindu family. Gandhi's father was of Modh Baniya caste in the varna of Vaishya. His mother came from the medieval Krishna bhakti-based Pranami tradition, whose religious texts include the Bhagavad Gita, the ''Bhagavata Purana'', and a collection of 14 texts with teachings that the tradition believes to include the essence of the Vedas, the Quran and the Bible. Gandhi was deeply influenced by his mother, an extremely pious lady who "would not think of taking her meals without her daily prayers... she would take the hardest vows and keep them without flinching. To keep two or three consecutive fasts was nothing to her." At age 9, Gandhi entered the local school in Rajkot, near his home. There, he studied the rudiments of arithmetic, history, the Gujarati language and geography. At the age of 11, he joined the High School in Rajkot, Alfred High School. He was an average student, won some prizes, but was a shy and tongue tied student, with no interest in games; his only companions were books and school lessons. === Marriage === In May 1883, the 13-year-old Mohandas was married to 14-year-old Kasturbai Gokuldas Kapadia (her first name was usually shortened to "Kasturba", and affectionately to "Ba") in an arranged marriage, according to the custom of the region at that time. In the process, he lost a year at school but was later allowed to make up by accelerating his studies. His wedding was a joint event, where his brother and cousin were also married. Recalling the day of their marriage, he once said, "As we didn't know much about marriage, for us it meant only wearing new clothes, eating sweets and playing with relatives." As was the prevailing tradition, the adolescent bride was to spend much time at her parents' house, and away from her husband. Writing many years later, Mohandas described with regret the lustful feelings he felt for his young bride: "even at school I used to think of her, and the thought of nightfall and our subsequent meeting was ever haunting me." He later recalled feeling jealous and possessive of her, such as when she would visit a temple with her girlfriends, and being sexually lustful in his feelings for her. In late 1885, Gandhi's father Karamchand died. Gandhi, then 16 years old, and his wife of age 17 had their first baby, who survived only a few days. The two deaths anguished Gandhi. The Gandhi couple had four more children, all sons: Harilal, born in 1888; Manilal, born in 1892; Ramdas, born in 1897; and Devdas, born in 1900. In November 1887, the 18-year-old Gandhi graduated from high school in Ahmedabad. In January 1888, he enrolled at Samaldas College in Bhavnagar State, then the sole degree-granting institution of higher education in the region. However, he dropped out, and returned to his family in Porbandar. == Three years in London == === Student of law === Gandhi had dropped out of the cheapest college he could afford in Bombay. Mavji Dave Joshiji, a Brahmin priest and family friend, advised Gandhi and his family that he should consider law studies in London. In July 1888, his wife Kasturba gave birth to their first surviving son, Harilal. His mother was not comfortable about Gandhi leaving his wife and family, and going so far from home. Gandhi's uncle Tulsidas also tried to dissuade his nephew. Gandhi wanted to go. To persuade his wife and mother, Gandhi made a vow in front of his mother that he would abstain from meat, alcohol and women. Gandhi's brother Laxmidas, who was already a lawyer, cheered Gandhi's London studies plan and offered to support him. Putlibai gave Gandhi her permission and blessing. On 10 August 1888, Gandhi, aged 18, left Porbandar for Mumbai, then known as Bombay. Upon arrival, he stayed with the local Modh Bania community whose elders warned him that England would tempt him to compromise his religion, and eat and drink in Western ways. Despite Gandhi informing them of his promise to his mother and her blessings, he was excommunicated from his caste. Gandhi ignored this, and on 4 September, he sailed from Bombay to London, with his brother seeing him off. Gandhi attended University College, London, where he took classes in English literature with Henry Morley in 1888–1889. He also enrolled at the Inns of Court School of Law in Inner Temple with the intention of becoming a barrister. His childhood shyness and self-withdrawal had continued through his teens. He retained these traits when he arrived in London, but joined a public speaking practice group and overcame his shyness sufficiently to practise law. He demonstrated a keen interest in the welfare of London's impoverished dockland communities. In 1889, a bitter trade dispute broke out in London, with dockers striking for better pay and conditions, and seamen, shipbuilders, factory girls and other joining the strike in solidarity. The strikers were successful, in part due to the mediation of Cardinal Manning, leading Gandhi and an Indian friend to make a point of visiting the cardinal and thanking him for his work. === Vegetarianism and committee work === Gandhi's time in London was influenced by the vow he had made to his mother. He tried to adopt "English" customs, including taking dancing lessons. However, he did not appreciate the bland vegetarian food offered by his landlady and was frequently hungry until he found one of London's few vegetarian restaurants. Influenced by Henry Salt's writing, he joined the London Vegetarian Society, and was elected to its executive committee under the aegis of its president and benefactor Arnold Hills. An achievement while on the committee was the establishment of a Bayswater chapter. Some of the vegetarians he met were members of the Theosophical Society, which had been founded in 1875 to further universal brotherhood, and which was devoted to the study of Buddhist and Hindu literature. They encouraged Gandhi to join them in reading the Bhagavad Gita both in translation as well as in the original. Gandhi had a friendly and productive relationship with Hills, but the two men took a different view on the continued LVS membership of fellow committee member Thomas Allinson. Their disagreement is the first known example of Gandhi challenging authority, despite his shyness and temperamental disinclination towards confrontation. Allinson had been promoting newly available birth control methods, but Hills disapproved of these, believing they undermined public morality. He believed vegetarianism to be a moral movement and that Allinson should therefore no longer remain a member of the LVS. Gandhi shared Hills' views on the dangers of birth control, but defended Allinson's right to differ. It would have been hard for Gandhi to challenge Hills; Hills was 12 years his senior and unlike Gandhi, highly eloquent. He bankrolled the LVS and was a captain of industry with his Thames Ironworks company employing more than 6,000 people in the East End of London. He was also a highly accomplished sportsman who later founded the football club West Ham United. In his 1927 ''An Autobiography, Vol. I'', Gandhi wrote:<blockquote>The question deeply interested me...I had a high regard for Mr. Hills and his generosity. But I thought it was quite improper to exclude a man from a vegetarian society simply because he refused to regard puritan morals as one of the objects of the society</blockquote>A motion to remove Allinson was raised, and was debated and voted on by the committee. Gandhi's shyness was an obstacle to his defence of Allinson at the committee meeting. He wrote his views down on paper but shyness prevented him from reading out his arguments, so Hills, the President, asked another committee member to read them out for him. Although some other members of the committee agreed with Gandhi, the vote was lost and Allinson excluded. There were no hard feelings, with Hills proposing the toast at the LVS farewell dinner in honour of Gandhi's return to India. === Called to the bar === Gandhi, at age 22, was called to the bar in June 1891 and then left London for India, where he learned that his mother had died while he was in London and that his family had kept the news from him. His attempts at establishing a law practice in Bombay failed because he was psychologically unable to cross-examine witnesses. He returned to Rajkot to make a modest living drafting petitions for litigants, but he was forced to stop when he ran afoul of British officer Sam Sunny. In 1893, a Muslim merchant in Kathiawar named Dada Abdullah contacted Gandhi. Abdullah owned a large successful shipping business in South Africa. His distant cousin in Johannesburg needed a lawyer, and they preferred someone with Kathiawari heritage. Gandhi inquired about his pay for the work. They offered a total salary of £105 (~$4,143.31 2023 money) plus travel expenses. He accepted it, knowing that it would be at least a one-year commitment in the Colony of Natal, South Africa, also a part of the British Empire. == Civil rights activist in South Africa (1893–1914) == In April 1893, Gandhi, aged 23, set sail for South Africa to be the lawyer for Abdullah's cousin. He spent 21 years in South Africa, where he developed his political views, ethics and politics. Immediately upon arriving in South Africa, Gandhi faced discrimination because of his skin colour and heritage. He was not allowed to sit with European passengers in the stagecoach and told to sit on the floor near the driver, then beaten when he refused; elsewhere he was kicked into a gutter for daring to walk near a house, in another instance thrown off a train at Pietermaritzburg after refusing to leave the first-class. He sat in the train station, shivering all night and pondering if he should return to India or protest for his rights. He chose to protest and was allowed to board the train the next day. In another incident, the magistrate of a Durban court ordered Gandhi to remove his turban, which he refused to do. Indians were not allowed to walk on public footpaths in South Africa. Gandhi was kicked by a police officer out of the footpath onto the street without warning. When Gandhi arrived in South Africa, according to Herman, he thought of himself as "a Briton first, and an Indian second". However, the prejudice against him and his fellow Indians from British people that Gandhi experienced and observed deeply bothered him. He found it humiliating, struggling to understand how some people can feel honour or superiority or pleasure in such inhumane practices. Gandhi began to question his people's standing in the British Empire. The Abdullah case that had brought him to South Africa concluded in May 1894, and the Indian community organised a farewell party for Gandhi as he prepared to return to India. However, a new Natal government discriminatory proposal led to Gandhi extending his original period of stay in South Africa. He planned to assist Indians in opposing a bill to deny them the right to vote, a right then proposed to be an exclusive European right. He asked Joseph Chamberlain, the British Colonial Secretary, to reconsider his position on this bill. Though unable to halt the bill's passage, his campaign was successful in drawing attention to the grievances of Indians in South Africa. He helped found the Natal Indian Congress in 1894, and through this organisation, he moulded the Indian community of South Africa into a unified political force. In January 1897, when Gandhi landed in Durban, a mob of white settlers attacked him and he escaped only through the efforts of the wife of the police superintendent. However, he refused to press charges against any member of the mob. During the Boer War, Gandhi volunteered in 1900 to form a group of stretcher-bearers as the Natal Indian Ambulance Corps. According to Arthur Herman, Gandhi wanted to disprove the British colonial stereotype that Hindus were not fit for "manly" activities involving danger and exertion, unlike the Muslim "martial races". Gandhi raised eleven hundred Indian volunteers, to support British combat troops against the Boers. They were trained and medically certified to serve on the front lines. They were auxiliaries at the Battle of Colenso to a White volunteer ambulance corps. At the battle of Spion Kop Gandhi and his bearers moved to the front line and had to carry wounded soldiers for miles to a field hospital because the terrain was too rough for the ambulances. Gandhi and thirty-seven other Indians received the Queen's South Africa Medal. In 1906, the Transvaal government promulgated a new Act compelling registration of the colony's Indian and Chinese populations. At a mass protest meeting held in Johannesburg on 11 September that year, Gandhi adopted his still evolving methodology of ''Satyagraha'' (devotion to the truth), or nonviolent protest, for the first time. According to Anthony Parel, Gandhi was also influenced by the Tamil moral text ''Tirukkuṛaḷ'' after Leo Tolstoy mentioned it in their correspondence that began with "A Letter to a Hindu". Gandhi urged Indians to defy the new law and to suffer the punishments for doing so. Gandhi's ideas of protests, persuasion skills and public relations had emerged. He took these back to India in 1915. === Europeans, Indians and Africans === Gandhi focused his attention on Indians and Africans while he was in South Africa. He initially was not interested in politics. This changed, however, after he was discriminated against and bullied, such as by being thrown out of a train coach because of his skin colour by a white train official. After several such incidents with Whites in South Africa, Gandhi's thinking and focus changed, and he felt he must resist this and fight for rights. He entered politics by forming the Natal Indian Congress. According to Ashwin Desai and Goolam Vahed, Gandhi's views on racism are contentious in some cases. Gandhi suffered persecution from the beginning in South Africa. Like with other coloured people, white officials denied him his rights, and the press and those in the streets bullied and called him a "parasite", "semi-barbarous", "canker", "squalid coolie", "yellow man", and other epithets. People would spit on him as an expression of racial hate. While in South Africa, Gandhi focused on the racial persecution of Indians before he started to focus on racism against Africans. In some cases, state Desai and Vahed, his behaviour was one of being a willing part of racial stereotyping and African exploitation. During a speech in September 1896, Gandhi complained that the whites in the British colony of South Africa were "degrading the Indian to the level of a raw Kaffir". Scholars cite it as an example of evidence that Gandhi at that time thought of Indians and black South Africans differently. As another example given by Herman, Gandhi, at the age of 24, prepared a legal brief for the Natal Assembly in 1895, seeking voting rights for Indians. Gandhi cited race history and European Orientalists' opinions that "Anglo-Saxons and Indians are sprung from the same Aryan stock or rather the Indo-European peoples", and argued that Indians should not be grouped with the Africans. Years later, Gandhi and his colleagues served and helped Africans as nurses and by opposing racism. The Nobel Peace Prize winner Nelson Mandela is among admirers of Gandhi's efforts to fight against racism in Africa. The general image of Gandhi, state Desai and Vahed, has been reinvented since his assassination as though he was always a saint, when in reality his life was more complex, contained inconvenient truths, and was one that changed over time. Scholars have also pointed the evidence to a rich history of co-operation and efforts by Gandhi and Indian people with nonwhite South Africans against persecution of Africans and the Apartheid. In 1906, when the Bambatha Rebellion broke out in the colony of Natal, the then 36-year-old Gandhi, despite sympathising with the Zulu rebels, encouraged Indian South Africans to form a volunteer stretcher-bearer unit. Writing in the ''Indian Opinion'', Gandhi argued that military service would be beneficial to the Indian community and claimed it would give them "health and happiness". Gandhi eventually led a volunteer mixed unit of Indian and African stretcher-bearers to treat wounded combatants during the suppression of the rebellion. The medical unit commanded by Gandhi operated for less than two months before being disbanded. After the suppression of the rebellion, the colonial establishment showed no interest in extending to the Indian community the civil rights granted to white South Africans. This led Gandhi to becoming disillusioned with the Empire and aroused a spiritual awakening with him; historian Arthur L. Herman wrote that his African experience was a part of his great disillusionment with the West, transforming him into an "uncompromising non-cooperator". By 1910, Gandhi's newspaper, ''Indian Opinion'', was covering reports on discrimination against Africans by the colonial regime. Gandhi remarked that the Africans are "alone are the original inhabitants of the land. … The whites, on the other hand, have occupied the land forcibly and appropriated it to themselves." In 1910, Gandhi established, with the help of his friend Hermann Kallenbach, an idealistic community they named Tolstoy Farm near Johannesburg. There he nurtured his policy of peaceful resistance. In the years after black South Africans gained the right to vote in South Africa (1994), Gandhi was proclaimed a national hero with numerous monuments. == Struggle for Indian independence (1915–1947) == See also: Indian independence movement At the request of Gopal Krishna Gokhale, conveyed to him by C. F. Andrews, Gandhi returned to India in 1915. He brought an international reputation as a leading Indian nationalist, theorist and community organiser. Gandhi joined the Indian National Congress and was introduced to Indian issues, politics and the Indian people primarily by Gokhale. Gokhale was a key leader of the Congress Party best known for his restraint and moderation, and his insistence on working inside the system. Gandhi took Gokhale's liberal approach based on British Whiggish traditions and transformed it to make it look Indian. Gandhi took leadership of the Congress in 1920 and began escalating demands until on 26 January 1930 the Indian National Congress declared the independence of India. The British did not recognise the declaration but negotiations ensued, with the Congress taking a role in provincial government in the late 1930s. Gandhi and the Congress withdrew their support of the Raj when the Viceroy declared war on Germany in September 1939 without consultation. Tensions escalated until Gandhi demanded immediate independence in 1942 and the British responded by imprisoning him and tens of thousands of Congress leaders. Meanwhile, the Muslim League did co-operate with Britain and moved, against Gandhi's strong opposition, to demands for a totally separate Muslim state of Pakistan. In August 1947 the British partitioned the land with India and Pakistan each achieving independence on terms that Gandhi disapproved. === Role in World War I === See also: The role of India in World War I In April 1918, during the latter part of World War I, the Viceroy invited Gandhi to a War Conference in Delhi. Gandhi agreed to actively recruit Indians for the war effort. In contrast to the Zulu War of 1906 and the outbreak of World War I in 1914, when he recruited volunteers for the Ambulance Corps, this time Gandhi attempted to recruit combatants. In a June 1918 leaflet entitled "Appeal for Enlistment", Gandhi wrote "To bring about such a state of things we should have the ability to defend ourselves, that is, the ability to bear arms and to use them... If we want to learn the use of arms with the greatest possible despatch, it is our duty to enlist ourselves in the army." He did, however, stipulate in a letter to the Viceroy's private secretary that he "personally will not kill or injure anybody, friend or foe." Gandhi's war recruitment campaign brought into question his consistency on nonviolence. Gandhi's private secretary noted that "The question of the consistency between his creed of 'Ahimsa' (nonviolence) and his recruiting campaign was raised not only then but has been discussed ever since." According to political and educational scientist Christian Bartolf, Gandhi's support for the war stemmed from his belief that true ahimsa could not exist simultaneously with cowardice. Therefore, he felt that Indians needed to be willing and capable of using arms before they voluntarily chose non-violence. In July 1918, Gandhi admitted that he couldn't persuade even one individual to enlist for the world war. "So far I have not a single recruit to my credit apart," Gandhi wrote. He added: "They object because they fear to die." === Champaran agitations === Main article: Champaran Satyagraha Gandhi's first major achievement came in 1917 with the Champaran agitation in Bihar. The Champaran agitation pitted the local peasantry against largely Anglo-Indian plantation owners who were backed by the local administration. The peasants were forced to grow indigo (''Indigofera'' sp.), a cash crop for Indigo dye whose demand had been declining over two decades, and were forced to sell their crops to the planters at a fixed price. Unhappy with this, the peasantry appealed to Gandhi at his ashram in Ahmedabad. Pursuing a strategy of nonviolent protest, Gandhi took the administration by surprise and won concessions from the authorities. === Kheda agitations === Main article: Kheda Satyagraha In 1918, Kheda was hit by floods and famine and the peasantry was demanding relief from taxes. Gandhi moved his headquarters to Nadiad, organising scores of supporters and fresh volunteers from the region, the most notable being Vallabhbhai Patel. Using non-co-operation as a technique, Gandhi initiated a signature campaign where peasants pledged non-payment of revenue even under the threat of confiscation of land. A social boycott of ''mamlatdars'' and ''talatdars'' (revenue officials within the district) accompanied the agitation. Gandhi worked hard to win public support for the agitation across the country. For five months, the administration refused, but by the end of May 1918, the Government gave way on important provisions and relaxed the conditions of payment of revenue tax until the famine ended. In Kheda, Vallabhbhai Patel represented the farmers in negotiations with the British, who suspended revenue collection and released all the prisoners. === Khilafat movement === Main article: Khilafat Movement In 1919, following World War I, Gandhi (aged 49) sought political co-operation from Muslims in his fight against British imperialism by supporting the Ottoman Empire that had been defeated in the World War. Before this initiative of Gandhi, communal disputes and religious riots between Hindus and Muslims were common in British India, such as the riots of 1917–18. Gandhi had already vocally supported the British crown in the first world war. This decision of Gandhi was in part motivated by the British promise to reciprocate the help with ''swaraj'' (self-government) to Indians after the end of World War I. The British government had offered, instead of self-government, minor reforms instead, disappointing Gandhi. Gandhi announced his ''satyagraha'' (civil disobedience) intentions. The British colonial officials made their counter move by passing the Rowlatt Act, to block Gandhi's movement. The Act allowed the British government to treat civil disobedience participants as criminals and gave it the legal basis to arrest anyone for "preventive indefinite detention, incarceration without judicial review or any need for a trial". Gandhi felt that Hindu-Muslim co-operation was necessary for political progress against the British. He leveraged the Khilafat movement, wherein Sunni Muslims in India, their leaders such as the sultans of princely states in India and Ali brothers championed the Turkish Caliph as a solidarity symbol of Sunni Islamic community (''ummah''). They saw the Caliph as their means to support Islam and the Islamic law after the defeat of Ottoman Empire in World War I. Gandhi's support to the Khilafat movement led to mixed results. It initially led to a strong Muslim support for Gandhi. However, the Hindu leaders including Rabindranath Tagore questioned Gandhi's leadership because they were largely against recognising or supporting the Sunni Islamic Caliph in Turkey. The increasing Muslim support for Gandhi, after he championed the Caliph's cause, temporarily stopped the Hindu-Muslim communal violence. It offered evidence of inter-communal harmony in joint Rowlatt ''satyagraha'' demonstration rallies, raising Gandhi's stature as the political leader to the British. His support for the Khilafat movement also helped him sideline Muhammad Ali Jinnah, who had announced his opposition to the ''satyagraha'' non-co-operation movement approach of Gandhi. Jinnah began creating his independent support, and later went on to lead the demand for West and East Pakistan. Though they agreed in general terms on Indian independence, they disagreed on the means of achieving this. Jinnah was mainly interested in dealing with the British via constitutional negotiation, rather than attempting to agitate the masses. In 1922 the Khilafat movement gradually collapsed following the end of the non-cooperation movement with the arrest of Gandhi. A number of Muslim leaders and delegates abandoned Gandhi and Congress. Hindu-Muslim communal conflicts reignited. Deadly religious riots re-appeared in numerous cities, with 91 in United Provinces of Agra and Oudh alone. === Non-co-operation === Main article: Non-co-operation movement With his book ''Hind Swaraj'' (1909) Gandhi, aged 40, declared that British rule was established in India with the co-operation of Indians and had survived only because of this co-operation. If Indians refused to co-operate, British rule would collapse and ''swaraj'' (Indian independence) would come. In February 1919, Gandhi cautioned the Viceroy of India with a cable communication that if the British were to pass the Rowlatt Act, he would appeal to Indians to start civil disobedience. The British government ignored him and passed the law, stating it would not yield to threats. The ''satyagraha'' civil disobedience followed, with people assembling to protest the Rowlatt Act. On 30 March 1919, British law officers opened fire on an assembly of unarmed people, peacefully gathered, participating in ''satyagraha'' in Delhi. People rioted in retaliation. On 6 April 1919, a Hindu festival day, he asked a crowd to remember not to injure or kill British people, but to express their frustration with peace, to boycott British goods and burn any British clothing they owned. He emphasised the use of non-violence to the British and towards each other, even if the other side used violence. Communities across India announced plans to gather in greater numbers to protest. Government warned him to not enter Delhi. Gandhi defied the order. On 9 April, Gandhi was arrested. On 13 April 1919, people including women with children gathered in an Amritsar park, and British Indian Army officer Reginald Dyer surrounded them and ordered troops under his command to fire on them. The resulting Jallianwala Bagh massacre (or Amritsar massacre) of hundreds of Sikh and Hindu civilians enraged the subcontinent, but was supported by some Britons and parts of the British media as a necessary response. Gandhi in Ahmedabad, on the day after the massacre in Amritsar, did not criticise the British and instead criticised his fellow countrymen for not exclusively using 'love' to deal with the 'hate' of the British government. Gandhi demanded that the Indian people stop all violence, stop all property destruction, and went on fast-to-death to pressure Indians to stop their rioting. The massacre and Gandhi's non-violent response to it moved many, but also made some Sikhs and Hindus upset that Dyer was getting away with murder. Investigation committees were formed by the British, which Gandhi asked Indians to boycott. The unfolding events, the massacre and the British response, led Gandhi to the belief that Indians will never get a fair equal treatment under British rulers, and he shifted his attention to ''swaraj'' and political independence for India. In 1921, Gandhi was the leader of the Indian National Congress. He reorganised the Congress. With Congress now behind him, and Muslim support triggered by his backing the Khilafat movement to restore the Caliph in Turkey, Gandhi had the political support and the attention of the British Raj. Gandhi expanded his nonviolent non-co-operation platform to include the ''swadeshi'' policy – the boycott of foreign-made goods, especially British goods. Linked to this was his advocacy that ''khadi'' (homespun cloth) be worn by all Indians instead of British-made textiles. Gandhi exhorted Indian men and women, rich or poor, to spend time each day spinning ''khadi'' in support of the independence movement. In addition to boycotting British products, Gandhi urged the people to boycott British institutions and law courts, to resign from government employment, and to forsake British titles and honours. Gandhi thus began his journey aimed at crippling the British India government economically, politically and administratively. The appeal of "Non-cooperation" grew, its social popularity drew participation from all strata of Indian society. Gandhi was arrested on 10 March 1922, tried for sedition, and sentenced to six years' imprisonment. He began his sentence on 18 March 1922. With Gandhi isolated in prison, the Indian National Congress split into two factions, one led by Chitta Ranjan Das and Motilal Nehru favouring party participation in the legislatures, and the other led by Chakravarti Rajagopalachari and Sardar Vallabhbhai Patel, opposing this move. Furthermore, co-operation among Hindus and Muslims ended as Khilafat movement collapsed with the rise of Atatürk in Turkey. Muslim leaders left the Congress and began forming Muslim organisations. The political base behind Gandhi had broken into factions. Gandhi was released in February 1924 for an appendicitis operation, having served only two years. === Salt Satyagraha (Salt March) === Main article: Salt Satyagraha [[/wiki/File:Salt_March.ogv|thumb|Original footage of Gandhi and his followers marching to Dandi in the Salt Satyagraha]] After his early release from prison for political crimes in 1924, over the second half of the 1920s Gandhi continued to pursue ''swaraj''. He pushed through a resolution at the Calcutta Congress in December 1928 calling on the British government to grant India dominion status or face a new campaign of non-cooperation with complete independence for the country as its goal. After his support for World War I with Indian combat troops, and the failure of Khilafat movement in preserving the rule of Caliph in Turkey, followed by a collapse in Muslim support for his leadership, some such as Subhas Chandra Bose and Bhagat Singh questioned his values and non-violent approach. While many Hindu leaders championed a demand for immediate independence, Gandhi revised his own call to a one-year wait, instead of two. The British did not respond favourably to Gandhi's proposal. British political leaders such as Lord Birkenhead and Winston Churchill announced opposition to "the appeasers of Gandhi" in their discussions with European diplomats who sympathised with Indian demands. On 31 December 1929, an Indian flag was unfurled in Lahore. Gandhi led Congress in a celebration on 26 January 1930 of India's Independence Day in Lahore. This day was commemorated by almost every other Indian organisation. Gandhi then launched a new Satyagraha against the British salt tax in March 1930. Gandhi sent an ultimatum in the form of a letter personally addressed to Lord Irwin, the viceroy of India, on 2 March. Gandhi condemned British rule in the letter, describing it as "a curse" that "has impoverished the dumb millions by a system of progressive exploitation and by a ruinously expensive military and civil administration...It has reduced us politically to serfdom." Gandhi also mentioned in the letter that the viceroy received a salary "over five thousand times India's average income." In the letter, Gandhi also stressed his continued adherence to non-violent forms of protest. This was highlighted by the Salt March to Dandi from 12 March to 6 April, where, together with 78 volunteers, he marched 388 kilometres (241 mi) from Ahmedabad to Dandi, Gujarat to make salt himself, with the declared intention of breaking the salt laws. The march took 25 days to cover 240 miles with Gandhi speaking to often huge crowds along the way. Thousands of Indians joined him in Dandi. On 5 May he was interned under a regulation dating from 1827 in anticipation of a protest that he had planned. The protest at Dharasana salt works on 21 May went ahead without him see. A horrified American journalist, Webb Miller, described the British response thus:<blockquote>In complete silence the Gandhi men drew up and halted a hundred yards from the stockade. A picked column advanced from the crowd, waded the ditches and approached the barbed wire stockade... at a word of command, scores of native policemen rushed upon the advancing marchers and rained blows on their heads with their steel-shot lathis [long bamboo sticks]. Not one of the marchers even raised an arm to fend off blows. They went down like ninepins. From where I stood I heard the sickening whack of the clubs on unprotected skulls... Those struck down fell sprawling, unconscious or writhing with fractured skulls or broken shoulders.</blockquote>This went on for hours until some 300 or more protesters had been beaten, many seriously injured and two killed. At no time did they offer any resistance. This campaign was one of his most successful at upsetting British hold on India; Britain responded by imprisoning over 60,000 people. Congress estimates, however, put the figure at 90,000. Among them was one of Gandhi's lieutenants, Jawaharlal Nehru. According to Sarma, Gandhi recruited women to participate in the salt tax campaigns and the boycott of foreign products, which gave many women a new self-confidence and dignity in the mainstream of Indian public life. However, other scholars such as Marilyn French state that Gandhi barred women from joining his civil disobedience movement because he feared he would be accused of using women as a political shield. When women insisted on joining the movement and participating in public demonstrations, Gandhi asked the volunteers to get permissions of their guardians and only those women who can arrange child-care should join him. Regardless of Gandhi's apprehensions and views, Indian women joined the Salt March by the thousands to defy the British salt taxes and monopoly on salt mining. After Gandhi's arrest, the women marched and picketed shops on their own, accepting violence and verbal abuse from British authorities for the cause in the manner Gandhi inspired. === Gandhi as folk hero === Indian Congress in the 1920s appealed to Andhra Pradesh peasants by creating Telugu language plays that combined Indian mythology and legends, linked them to Gandhi's ideas, and portrayed Gandhi as a messiah, a reincarnation of ancient and medieval Indian nationalist leaders and saints. The plays built support among peasants steeped in traditional Hindu culture, according to Murali, and this effort made Gandhi a folk hero in Telugu speaking villages, a sacred messiah-like figure. According to Dennis Dalton, it was Gandhi's ideas that were responsible for his wide following. Gandhi criticised Western civilisation as one driven by "brute force and immorality", contrasting it with his categorisation of Indian civilisation as one driven by "soul force and morality". Gandhi captured the imagination of the people of his heritage with his ideas about winning "hate with love". These ideas are evidenced in his pamphlets from the 1890s, in South Africa, where too he was popular among the Indian indentured workers. After he returned to India, people flocked to him because he reflected their values. Gandhi also campaigned hard going from one rural corner of the Indian subcontinent to another. He used terminology and phrases such as ''Rama-rajya'' from ''Ramayana'', Prahlada as a paradigmatic icon, and such cultural symbols as another facet of ''swaraj'' and ''satyagraha''. During his lifetime, these ideas sounded strange outside India, but they readily and deeply resonated with the culture and historic values of his people. === Negotiations === The government, represented by Lord Irwin, decided to negotiate with Gandhi. The Gandhi–Irwin Pact was signed in March 1931. The British Government agreed to free all political prisoners, in return for the suspension of the civil disobedience movement. According to the pact, Gandhi was invited to attend the Round Table Conference in London for discussions and as the sole representative of the Indian National Congress. The conference was a disappointment to Gandhi and the nationalists. Gandhi expected to discuss India's independence, while the British side focused on the Indian princes and Indian minorities rather than on a transfer of power. Lord Irwin's successor, Lord Willingdon, took a hard line against India as an independent nation, began a new campaign of controlling and subduing the nationalist movement. Gandhi was again arrested, and the government tried and failed to negate his influence by completely isolating him from his followers. In Britain, Winston Churchill, a prominent Conservative politician who was then out of office but later became its prime minister, became a vigorous and articulate critic of Gandhi and opponent of his long-term plans. Churchill often ridiculed Gandhi, saying in a widely reported 1931 speech:<blockquote>It is alarming and also nauseating to see Mr Gandhi, a seditious Middle Temple lawyer, now posing as a fakir of a type well known in the East, striding half-naked up the steps of the Vice-regal palace....to parley on equal terms with the representative of the King-Emperor.</blockquote>Churchill's bitterness against Gandhi grew in the 1930s. He called Gandhi as the one who was "seditious in aim" whose evil genius and multiform menace was attacking the British empire. Churchill called him a dictator, a "Hindu Mussolini", fomenting a race war, trying to replace the Raj with Brahmin cronies, playing on the ignorance of Indian masses, all for selfish gain. Churchill attempted to isolate Gandhi, and his criticism of Gandhi was widely covered by European and American press. It gained Churchill sympathetic support, but it also increased support for Gandhi among Europeans. The developments heightened Churchill's anxiety that the "British themselves would give up out of pacifism and misplaced conscience". === Round Table Conferences === During the discussions between Gandhi and the British government over 1931–32 at the Round Table Conferences, Gandhi, now aged about 62, sought constitutional reforms as a preparation to the end of colonial British rule, and begin the self-rule by Indians. The British side sought reforms that would keep the Indian subcontinent as a colony. The British negotiators proposed constitutional reforms on a British Dominion model that established separate electorates based on religious and social divisions. The British questioned the Congress party and Gandhi's authority to speak for all of India. They invited Indian religious leaders, such as Muslims and Sikhs, to press their demands along religious lines, as well as B. R. Ambedkar as the representative leader of the untouchables. Gandhi vehemently opposed a constitution that enshrined rights or representations based on communal divisions, because he feared that it would not bring people together but divide them, perpetuate their status, and divert the attention from India's struggle to end the colonial rule. The Second Round Table conference was the only time he left India between 1914 and his death in 1948. He declined the government's offer of accommodation in an expensive West End hotel, preferring to stay in the East End, to live among working-class people, as he did in India. He based himself in a small cell-bedroom at Kingsley Hall for the three-month duration of his stay and was enthusiastically received by East Enders. During this time he renewed his links with the British vegetarian movement. After Gandhi returned from the Second Round Table conference, he started a new ''satyagraha''. He was arrested and imprisoned at the Yerwada Jail, Pune. While he was in prison, the British government enacted a new law that granted untouchables a separate electorate. It came to be known as the Communal Award. In protest, Gandhi started a fast-unto-death, while he was held in prison. The resulting public outcry forced the government, in consultations with Ambedkar, to replace the Communal Award with a compromise Poona Pact. === Congress politics === In 1934 Gandhi resigned from Congress party membership. He did not disagree with the party's position but felt that if he resigned, his popularity with Indians would cease to stifle the party's membership, which actually varied, including communists, socialists, trade unionists, students, religious conservatives, and those with pro-business convictions, and that these various voices would get a chance to make themselves heard. Gandhi also wanted to avoid being a target for Raj propaganda by leading a party that had temporarily accepted political accommodation with the Raj. Gandhi returned to active politics again in 1936, with the Nehru presidency and the Lucknow session of the Congress. Although Gandhi wanted a total focus on the task of winning independence and not speculation about India's future, he did not restrain the Congress from adopting socialism as its goal. Gandhi had a clash with Subhas Chandra Bose, who had been elected president in 1938, and who had previously expressed a lack of faith in nonviolence as a means of protest. Despite Gandhi's opposition, Bose won a second term as Congress President, against Gandhi's nominee, Bhogaraju Pattabhi Sitaramayya. Gandhi declared that Sitaramayya's defeat was his defeat. Bose later left the Congress when the All-India leaders resigned en masse in protest of his abandonment of the principles introduced by Gandhi. === World War II and ''Quit India movement'' === Main article: Quit India Movement Gandhi opposed providing any help to the British war effort and he campaigned against any Indian participation in World War II. The British government responded with the arrests of Gandhi and many other Congress leaders and killed over 1,000 Indians who participated in this movement. A number of violent attacks were also carried out by the nationalists against the British government. While Gandhi's campaign did not enjoy the support of a number of Indian leaders, and over 2.5 million Indians volunteered and joined the British military to fight on various fronts of the Allied Forces, the movement played a role in weakening the control over the South Asian region by the British regime and it ultimately paved the way for Indian independence. Gandhi's opposition to the Indian participation in World War II was motivated by his belief that India could not be party to a war ostensibly being fought for democratic freedom while that freedom was denied to India itself. He also condemned Nazism and Fascism, a view which won endorsement of other Indian leaders. As the war progressed, Gandhi intensified his demand for independence, calling for the British to ''Quit India'' in a 1942 speech in Mumbai. This was Gandhi's and the Congress Party's most definitive revolt aimed at securing the British exit from India. The British government responded quickly to the Quit India speech, and within hours after Gandhi's speech arrested Gandhi and all the members of the Congress Working Committee. His countrymen retaliated the arrests by damaging or burning down hundreds of government owned railway stations, police stations, and cutting down telegraph wires. In 1942, Gandhi now nearing age 73, urged his people to completely stop co-operating with the imperial government. In this effort, he urged that they neither kill nor injure British people, but be willing to suffer and die if violence is initiated by the British officials. He clarified that the movement would not be stopped because of any individual acts of violence, saying that the ''"ordered anarchy"'' of ''"the present system of administration"'' was ''"worse than real anarchy."'' He urged Indians to ''karo ya maro'' ("do or die") in the cause of their rights and freedoms. Gandhi's arrest lasted two years, as he was held in the Aga Khan Palace in Pune. During this period, his long time secretary Mahadev Desai died of a heart attack, his wife Kasturba died after 18 months' imprisonment on 22 February 1944; and Gandhi suffered a severe malaria attack. While in jail, he agreed to an interview with Stuart Gelder, a British journalist. Gelder then composed and released an interview summary, cabled it to the mainstream press, that announced sudden concessions Gandhi was willing to make, comments that shocked his countrymen, the Congress workers and even Gandhi. The latter two claimed that it distorted what Gandhi actually said on a range of topics and falsely repudiated the Quit India movement. Gandhi was released before the end of the war on 6 May 1944 because of his failing health and necessary surgery; the Raj did not want him to die in prison and enrage the nation. He came out of detention to an altered political scene – the Muslim League for example, which a few years earlier had appeared marginal, "now occupied the centre of the political stage" and the topic of Jinnah's campaign for Pakistan was a major talking point. Gandhi and Jinnah had extensive correspondence and the two men met several times over a period of two weeks in September 1944 at Jinnah's house in Bombay, where Gandhi insisted on a united religiously plural and independent India which included Muslims and non-Muslims of the Indian subcontinent coexisting. Jinnah rejected this proposal and insisted instead for partitioning the subcontinent on religious lines to create a separate Muslim homeland (later Pakistan). These discussions continued through 1947. While the leaders of Congress languished in jail, the other parties supported the war and gained organisational strength. Underground publications flailed at the ruthless suppression of Congress, but it had little control over events. At the end of the war, the British gave clear indications that power would be transferred to Indian hands. At this point Gandhi called off the struggle, and around 100,000 political prisoners were released, including the Congress's leadership. === Partition and independence === See also: Indian independence movement and Partition of India Gandhi opposed the partition of the Indian subcontinent along religious lines. The Indian National Congress and Gandhi called for the British to Quit India. However, the All-India Muslim League demanded "Divide and Quit India". Gandhi suggested an agreement which required the Congress and the Muslim League to co-operate and attain independence under a provisional government, thereafter, the question of partition could be resolved by a plebiscite in the districts with a Muslim majority. Jinnah rejected Gandhi's proposal and called for Direct Action Day, on 16 August 1946, to press Muslims to publicly gather in cities and support his proposal for the partition of the Indian subcontinent into a Muslim state and non-Muslim state. Huseyn Shaheed Suhrawardy, the Muslim League Chief Minister of Bengal – now Bangladesh and West Bengal, gave Calcutta's police special holiday to celebrate the Direct Action Day. The Direct Action Day triggered a mass murder of Calcutta Hindus and the torching of their property, and holidaying police were missing to contain or stop the conflict. The British government did not order its army to move in to contain the violence. The violence on Direct Action Day led to retaliatory violence against Muslims across India. Thousands of Hindus and Muslims were murdered, and tens of thousands were injured in the cycle of violence in the days that followed. Gandhi visited the most riot-prone areas to appeal a stop to the massacres. Archibald Wavell, the Viceroy and Governor-General of British India for three years through February 1947, had worked with Gandhi and Jinnah to find a common ground, before and after accepting Indian independence in principle. Wavell condemned Gandhi's character and motives as well as his ideas. Wavell accused Gandhi of harbouring the single minded idea to "overthrow British rule and influence and to establish a Hindu raj", and called Gandhi a "malignant, malevolent, exceedingly shrewd" politician. Wavell feared a civil war on the Indian subcontinent, and doubted Gandhi would be able to stop it. The British reluctantly agreed to grant independence to the people of the Indian subcontinent, but accepted Jinnah's proposal of partitioning the land into Pakistan and India. Gandhi was involved in the final negotiations, but Stanley Wolpert states the "plan to carve up British India was never approved of or accepted by Gandhi". The partition was controversial and violently disputed. More than half a million were killed in religious riots as 10 million to 12 million non-Muslims (Hindus and Sikhs mostly) migrated from Pakistan into India, and Muslims migrated from India into Pakistan, across the newly created borders of India, West Pakistan and East Pakistan. Gandhi spent the day of independence not celebrating the end of the British rule but appealing for peace among his countrymen by fasting and spinning in Calcutta on 15 August 1947. The partition had gripped the Indian subcontinent with religious violence and the streets were filled with corpses. Gandhi's fasting and protests are credited for stopping the religious riots and communal violence. == Death == Main article: Assassination of Mahatma Gandhi At 5:17 pm on 30 January 1948, Gandhi was with his grandnieces in the garden of Birla House (now Gandhi Smriti), on his way to address a prayer meeting, when Nathuram Godse, a Hindu nationalist, fired three bullets into his chest from a pistol at close range. According to some accounts, Gandhi died instantly. In other accounts, such as one prepared by an eyewitness journalist, Gandhi was carried into the Birla House, into a bedroom. There he died about 30 minutes later as one of Gandhi's family members read verses from Hindu scriptures. Prime Minister Jawaharlal Nehru addressed his countrymen over the All-India Radio saying:<blockquote>Friends and comrades, the light has gone out of our lives, and there is darkness everywhere, and I do not quite know what to tell you or how to say it. Our beloved leader, Bapu as we called him, the father of the nation, is no more. Perhaps I am wrong to say that; nevertheless, we will not see him again, as we have seen him for these many years, we will not run to him for advice or seek solace from him, and that is a terrible blow, not only for me, but for millions and millions in this country.</blockquote>Godse, a Hindu nationalist, with links to the Hindu Mahasabha and the Rashtriya Swayamsevak Sangh, made no attempt to escape; several other conspirators were soon arrested as well. The accused were Nathuram Vinayak Godse, Narayan Apte, Vinayak Damodar Savarkar, Shankar Kistayya, Dattatraya Parchure, Vishnu Karkare, Madanlal Pahwa, and Gopal Godse. The trial began on 27 May 1948 and ran for eight months before Justice Atma Charan passed his final order on 10 February 1949. The prosecution called 149 witnesses, the defense none. The court found all of the defendants except one guilty as charged. Eight men were convicted for the murder conspiracy, and others were convicted for violation of the Explosive Substances Act. Savarkar was acquitted and set free. Nathuram Godse and Narayan Apte were sentenced to death by hanging and the remaining six (including Godse's brother, Gopal) were sentenced to life imprisonment. === Funeral and memorials === Gandhi's death was mourned nationwide. Over a million people joined the five-mile-long funeral procession that took over five hours to reach Raj Ghat from Birla house, where he was assassinated, and another million watched the procession pass by. Gandhi's body was transported on a weapons carrier, whose chassis was dismantled overnight to allow a high-floor to be installed so that people could catch a glimpse of his body. The engine of the vehicle was not used; instead four drag-ropes held by 50 people each pulled the vehicle. All Indian-owned establishments in London remained closed in mourning as thousands of people from all faiths and denominations and Indians from all over Britain converged at India House in London. Gandhi was cremated in accordance with Hindu tradition. His ashes were poured into urns which were sent across India for memorial services. Most of the ashes were immersed at the Sangam at Allahabad on 12 February 1948, but some were secretly taken away. In 1997, Tushar Gandhi immersed the contents of one urn, found in a bank vault and reclaimed through the courts, at the Sangam at Allahabad. Some of Gandhi's ashes were scattered at the source of the Nile River near Jinja, Uganda, and a memorial plaque marks the event. On 30 January 2008, the contents of another urn were immersed at Girgaum Chowpatty. Another urn is at the palace of the Aga Khan in Pune (where Gandhi was held as a political prisoner from 1942 to 1944) and another in the Self-Realization Fellowship Lake Shrine in Los Angeles. The Birla House site where Gandhi was assassinated is now a memorial called Gandhi Smriti. The place near Yamuna river where he was cremated is the Rāj Ghāt memorial in New Delhi. A black marble platform, it bears the epigraph "Hē Rāma" (Devanagari: ''हे ! राम'' or, ''Hey Raam''). These are said to be Gandhi's last words after he was shot. == Principles, practices, and beliefs == Main article: Practices and beliefs of Mahatma Gandhi See also: Gandhism Gandhi's statements, letters and life have attracted much political and scholarly analysis of his principles, practices and beliefs, including what influenced him. Some writers present him as a paragon of ethical living and pacifism, while others present him as a more complex, contradictory and evolving character influenced by his culture and circumstances. === Truth and Satyagraha === Gandhi dedicated his life to discovering and pursuing truth, or ''Satya'', and called his movement satyagraha, which means "appeal to, insistence on, or reliance on the Truth". The first formulation of the ''satyagraha'' as a political movement and principle occurred in 1920, which he tabled as "Resolution on Non-cooperation" in September that year before a session of the Indian Congress. It was the ''satyagraha'' formulation and step, states Dennis Dalton, that deeply resonated with beliefs and culture of his people, embedded him into the popular consciousness, transforming him quickly into Mahatma. Gandhi based ''Satyagraha'' on the Vedantic ideal of self-realisation, ahimsa (nonviolence), vegetarianism, and universal love. William Borman states that the key to his ''satyagraha'' is rooted in the Hindu Upanishadic texts. According to Indira Carr, Gandhi's ideas on ''ahimsa'' and ''satyagraha'' were founded on the philosophical foundations of Advaita Vedanta. I. Bruce Watson states that some of these ideas are found not only in traditions within Hinduism, but also in Jainism or Buddhism, particularly those about non-violence, vegetarianism and universal love, but Gandhi's synthesis was to politicise these ideas. Gandhi's concept of ''satya'' as a civil movement, states Glyn Richards, are best understood in the context of the Hindu terminology of Dharma and ''Ṛta''. Gandhi stated that the most important battle to fight was overcoming his own demons, fears, and insecurities. Gandhi summarised his beliefs first when he said "God is Truth". He would later change this statement to "Truth is God". Thus, ''satya'' (truth) in Gandhi's philosophy is "God". Gandhi, states Richards, described the term "God" not as a separate power, but as the Being (Brahman, Atman) of the Advaita Vedanta tradition, a nondual universal that pervades in all things, in each person and all life. According to Nicholas Gier, this to Gandhi meant the unity of God and humans, that all beings have the same one soul and therefore equality, that ''atman'' exists and is same as everything in the universe, ahimsa (non-violence) is the very nature of this ''atman''. The essence of Satyagraha is "soul force" as a political means, refusing to use brute force against the oppressor, seeking to eliminate antagonisms between the oppressor and the oppressed, aiming to transform or "purify" the oppressor. It is not inaction but determined passive resistance and non-co-operation where, states Arthur Herman, "love conquers hate". A euphemism sometimes used for Satyagraha is that it is a "silent force" or a "soul force" (a term also used by Martin Luther King Jr. during his "I Have a Dream" speech). It arms the individual with moral power rather than physical power. Satyagraha is also termed a "universal force", as it essentially "makes no distinction between kinsmen and strangers, young and old, man and woman, friend and foe." Gandhi wrote: "There must be no impatience, no barbarity, no insolence, no undue pressure. If we want to cultivate a true spirit of democracy, we cannot afford to be intolerant. Intolerance betrays want of faith in one's cause." Civil disobedience and non-co-operation as practised under Satyagraha are based on the "law of suffering", a doctrine that ''the endurance of suffering is a means to an end''. This end usually implies a moral upliftment or progress of an individual or society. Therefore, non-co-operation in Satyagraha is in fact a means to secure the co-operation of the opponent consistently with truth and justice. While Gandhi's idea of ''satyagraha'' as a political means attracted a widespread following among Indians, the support was not universal. For example, Muslim leaders such as Jinnah opposed the ''satyagraha'' idea, accused Gandhi to be reviving Hinduism through political activism, and began effort to counter Gandhi with Muslim nationalism and a demand for Muslim homeland. The untouchability leader Ambedkar, in June 1945, after his decision to convert to Buddhism and the first Law and Justice minister of modern India, dismissed Gandhi's ideas as loved by "blind Hindu devotees", primitive, influenced by spurious brew of Tolstoy and Ruskin, and "there is always some simpleton to preach them". Winston Churchill caricatured Gandhi as a "cunning huckster" seeking selfish gain, an "aspiring dictator", and an "atavistic spokesman of a pagan Hinduism". Churchill stated that the civil disobedience movement spectacle of Gandhi only increased "the danger to which white people there [British India] are exposed". === Nonviolence === Although Gandhi was not the originator of the principle of nonviolence, he was the first to apply it in the political field on a large scale. The concept of nonviolence (''ahimsa'') has a long history in Indian religious thought, and is considered the highest dharma (ethical value/virtue), a precept to be observed towards all living beings (''sarvbhuta''), at all times (''sarvada''), in all respects (''sarvatha''), in action, words and thought. Gandhi explains his philosophy and ideas about ''ahimsa'' as a political means in his autobiography ''The Story of My Experiments with Truth''. Even though Gandhi considered non-violence to be "infinitely superior to violence", he preferred violence to cowardice. He added that he "would rather have India resort to arms in order to defend her honor than that she should in a cowardly manner become or remain a helpless witness to her own dishonor". == Literary works == Gandhi was a prolific writer. His signature style was simple, precise, clear and as devoid of artificialities. One of Gandhi's earliest publications, ''Hind Swaraj'', published in Gujarati in 1909, became "the intellectual blueprint" for India's independence movement. The book was translated into English the next year, with a copyright legend that read "No Rights Reserved". For decades he edited several newspapers including ''Harijan'' in Gujarati, in Hindi and in the English language; ''Indian Opinion'' while in South Africa and, ''Young India'', in English, and ''Navajivan'', a Gujarati monthly, on his return to India. Later, ''Navajivan'' was also published in Hindi. In addition, he wrote letters almost every day to individuals and newspapers. Gandhi also wrote several books including his autobiography, ''The Story of My Experiments with Truth (Gujarātī "સત્યના પ્રયોગો અથવા આત્મકથા")'', of which he bought the entire first edition to make sure it was reprinted. His other autobiographies included: ''Satyagraha in South Africa'' about his struggle there, ''Hind Swaraj or Indian Home Rule'', a political pamphlet, and a paraphrase in Gujarati of John Ruskin's ''Unto This Last'' which was an early critique of political economy. This last essay can be considered his programme on economics. He also wrote extensively on vegetarianism, diet and health, religion, social reforms, etc. Gandhi usually wrote in Gujarati, though he also revised the Hindi and English translations of his books. In 1934, he wrote ''Songs from Prison'' while prisoned in Yerawada jail in Maharashtra. Gandhi's complete works were published by the Indian government under the name ''The Collected Works of Mahatma Gandhi'' in the 1960s. The writings comprise about 50,000 pages published in about a hundred volumes. In 2000, a revised edition of the complete works sparked a controversy, as it contained a large number of errors and omissions. The Indian government later withdrew the revised edition. 99b372cba2b55536c33a474d3e280942580659a7 Main Page 0 1 1357 1175 2024-03-17T14:02:56Z Motzoid India 2 /* ARYAVARTPEDIA */ wikitext text/x-wiki == ARYAVRATPEDIA == <div id="articlecount">[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles in [[English language|English]]</div> {{Main Page/Introduction}}{{Main Page/topics}} 1ce86ae5f166813eb0f1913e92edbd6cbbe81e00 1362 1357 2024-03-18T09:00:16Z Motzoid India 2 wikitext text/x-wiki == ARYAVARTPEDIA == <div id="articlecount">[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles in [[English language|English]]</div> {{Main Page/Introduction}}{{Main Page/topics}} f1bd9da803c0b438bfc54fb499c79c6c9397c3d0 Aryan invasion theory 0 666 1358 2024-03-17T16:32:04Z 80.5.18.102 0 Redirected page to [[Indo-Aryan migrations]] wikitext text/x-wiki #REDIRECT [[Indo-Aryan migrations]] 3808611d772444a5953df2eceaec760fba7cde9b Indo-Aryan migrations 0 667 1359 2024-03-17T16:33:26Z 80.5.18.102 0 Created page with "The '''Indo-Aryan migrations''' were the migrations into the Indian subcontinent of Indo-Aryan peoples, an ethnolinguistic group that spoke Indo-Aryan languages. These are the predominant languages of today's Bangladesh, Maldives, Nepal, North India, Eastern Pakistan, and Sri Lanka. Indo-Aryan migration into the region, from Central Asia, are considered to have started after 2000 BCE as a slow diffusion during the Late Harappan period and led to a language shift in the..." wikitext text/x-wiki The '''Indo-Aryan migrations''' were the migrations into the Indian subcontinent of Indo-Aryan peoples, an ethnolinguistic group that spoke Indo-Aryan languages. These are the predominant languages of today's Bangladesh, Maldives, Nepal, North India, Eastern Pakistan, and Sri Lanka. Indo-Aryan migration into the region, from Central Asia, are considered to have started after 2000 BCE as a slow diffusion during the Late Harappan period and led to a language shift in the northern Indian subcontinent. Several hundred years later, the Iranian languages were brought into the Iranian plateau by the Iranians, who were closely related to the Indo-Aryans. The Proto-Indo-Iranian culture, which gave rise to the Indo-Aryans and Iranians, developed on the Central Asian steppes north of the Caspian Sea as the Sintashta culture (c. 2200-1900 BCE), in present-day Russia and Kazakhstan, and developed further as the Andronovo culture (2000–1450 BCE). The Indo-Aryans split off sometime between 2000 BCE and 1600 BCE from the Indo-Iranians, and migrated southwards to the Bactria–Margiana culture (BMAC), from which they borrowed some of their distinctive religious beliefs and practices. From the BMAC, the Indo-Aryans migrated into northern Syria and, possibly in multiple waves, into the Punjab (northern Pakistan and India), while the Iranians could have reached western Iran before 1300 BCE, both bringing with them the Indo-Iranian languages. Migration by an Indo-European-speaking people was first hypothesized in the late 18th century, following the discovery of the Indo-European language family, when similarities between western and Indian languages had been noted. Given these similarities, a single source or origin was proposed, which was diffused by migrations from some original homeland. This linguistic argument of this theory is supported by archaeological, anthropological, genetic, literary and ecological research. Genetic research reveals that those migrations form part of a complex genetic puzzle on the origin and spread of the various components of the Indian population. Literary research reveals similarities between various, geographically distinct, Indo-Aryan historical cultures. Ecological studies reveal that in the second millennium BCE widespread aridization led to water shortages and ecological changes in both the Eurasian steppes and the Indian subcontinent, causing the collapse of sedentary urban cultures in south central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations, resulting in the merger of migrating peoples with the post-urban cultures. The Indo-Aryan migrations started sometime in the period from approximately 2000 to 1600 BCE, after the invention of the war chariot, and also brought Indo-Aryan languages into the Levant and possibly Inner Asia. It was part of the diffusion of Indo-European languages from the proto-Indo-European homeland at the Pontic–Caspian steppe, a large area of grasslands in far Eastern Europe, which started in the 5th to 4th millennia BCE, and the Indo-European migrations out of the Eurasian Steppes, which started approximately in 2000 BCE. These Indo-Aryan speaking people were united by shared cultural norms and language, referred to as ''ārya'', "noble". Diffusion of this culture and language took place by patron-client systems, which allowed for the absorption and acculturation of other groups into this culture, and explains the strong influence on other cultures with which it interacted. == Fundamentals == The Indo-Aryan migration theory is part of a larger theoretical framework. This framework explains the similarities between a wide range of contemporary and ancient languages. It combines linguistic, archaeological and anthropological research. This provides an overview of the development of Indo-European languages, and the spread of these Indo-European languages by migration and acculturation. === Linguistics: relationships between languages === The linguistic part traces the connections between the various Indo-European languages, and reconstructs the proto-Indo-European language. This is possible because the processes that change languages are not random, but follow strict patterns. Sound shifts, the changing of vowels and consonants, are especially important, although grammar (especially morphology) and the lexicon (vocabulary) may also be significant. Historical-comparative linguistics thus makes it possible to see great similarities between related languages which at first sight might seem very different. Various characteristics of the Indo-European languages argue against an Indian origin of these languages, and point to a steppe origin. === Archaeology: migrations from the steppe Urheimat === The archaeological part posits an "Urheimat" on the Pontic steppes, which developed after the introduction of cattle on the steppes around 5,200 BCE. This introduction marked the change from foragist to pastoralist cultures, and the development of a hierarchical social system with chieftains, patron-client systems, and the exchange of goods and gifts. The oldest nucleus may have been the Samara culture (late 6th and early 5th millennium BCE), at a bend in the Volga. A wider "horizon" developed, called the Kurgan culture by Marija Gimbutas in the 1950s. She included several cultures in this "Kurgan Culture", including the Samara culture and the Yamna culture, although the Yamna culture (36th–23rd centuries BCE), also called "Pit Grave Culture", may more aptly be called the "nucleus" of the proto-Indo-European language. From this area, which already included various subcultures, Indo-European languages spread west, south and east starting around 4,000 BCE. These languages may have been carried by small groups of males, with patron-client systems which allowed for the inclusion of other groups into their cultural system. Eastward emerged the Sintashta culture (2200–1900 BCE), where common Indo-Iranian was spoken. Out of the Sintashta culture developed the Andronovo culture (2000–1450 BCE), which interacted with the Bactria-Margiana culture (2250–1700 BCE). This interaction further shaped the Indo-Iranians, which split at sometime between 2000 and 1600 BCE into the Indo-Aryans and the Iranians. The Indo-Aryans migrated to the Levant and South Asia. The migration into northern India was not a large-scale immigration, but may have consisted of small groups which were genetically diverse.<sup>[''clarification needed'']</sup> Their culture and language spread by the same mechanisms of acculturalisation, and the absorption of other groups into their patron-client system. === Anthropology: elite recruitment and language shift === See also: Language shift Indo-European languages probably spread through language shifts. Small groups can change a larger cultural area, and elite male dominance by small groups may have led to a language shift in northern India. David Anthony, in his "revised Steppe hypothesis" notes that the spread of the Indo-European languages probably did not happen through "chain-type folk migrations", but by the introduction of these languages by ritual and political elites, which were emulated by large groups of people, a process which he calls "elite recruitment". According to Parpola, local elites joined "small but powerful groups" of Indo-European speaking migrants. These migrants had an attractive social system and good weapons, and luxury goods which marked their status and power. Joining these groups was attractive for local leaders, since it strengthened their position, and gave them additional advantages. These new members were further incorporated by matrimonial alliances. According to Joseph Salmons, language shift is facilitated by "dislocation" of language communities, in which the elite is taken over. According to Salmons, this change is facilitated by "systematic changes in community structure", in which a local community becomes incorporated in a larger social structure. === Genetics: ancient ancestry and multiple gene flows === See also: Genetics and archaeogenetics of South Asia and Peopling of India The Indo-Aryan migrations form part of a complex genetic puzzle on the origin and spread of the various components of the Indian population, including various waves of admixture and language shift. Studies indicate north and south Indians share a common maternal ancestry. A series of studies show that the Indian subcontinent harbours two major ancestral components, namely the ''Ancestral North Indians'' (ANI) which is "genetically close to Middle Easterners, Central Asians, and Europeans", and the ''Ancestral South Indians'' (ASI) which is clearly distinct from ANI. These two groups mixed in India between 4,200 and 1,900 years ago (2200 BCE – 100 CE), after which a shift to endogamy took place, possibly by the enforcement of "social values and norms" during the Gupta Empire.<sup>[''when?'']</sup> Moorjani et al. (2013) describe three scenarios regarding the bringing together of the two groups: migrations before the development of agriculture before 8,000–9,000 years before present (BP); migration of western Asian people together with the spread of agriculture, maybe up to 4,600 years BP; migrations of western Eurasians from 3,000 to 4,000 years BP. While Reich notes that the onset of admixture coincides with the arrival of Indo-European language, according to Moorjani et al. (2013) these groups were present "unmixed" in India before the Indo-Aryan migrations. Gallego Romero et al. (2011) propose that the ANI component came from Iran and the Middle East, less than 10,000 years ago, while according to Lazaridis et al. (2016) ANI is a mix of "early farmers of western Iran" and "people of the Bronze Age Eurasian steppe". Several studies also show traces of later influxes of maternal genetic material and of paternal genetic material related to ANI and possibly the Indo-Europeans. While others have analysed the hereditary distribution of lactose intolerance, and specifically the presence of the -13910T lactase persistence mutation, found in Europe and Central Asia, across South Asia. === Literary research: similarities, geography, and references to migration === The oldest known inscribed Indo-Iranian words, and particularly invocations of the Indo-Aryan deities, date to mid second millennia BCE, as loan words in Hurrian treaties of the Mitanni kingdom, of present-day northern Syria. The religious practices depicted in the ''Rigveda'' and those depicted in the ''Avesta'', the central religious text of Zoroastrianism, show similarities. Some of the references to the Sarasvati in the Rigveda refer to the Ghaggar-Hakra River, while the Afghan river Haraxvaiti/Harauvati Helmand is sometimes quoted as the locus of the early Rigvedic river.<sup>[''needs context'']</sup> The Rigveda does not explicitly refer to an external homeland or to a migration, but later Vedic and Puranic texts do show the movement into the Gangetic plains. A number of Indologists and historians offering the Baudhayana Shrauta Sutra, verse 18.44:397.9, as explicit recorded evidence of a migration:<blockquote>Then, there is the following direct statement contained in (the admittedly much later) BSS [Baudhāyana Śrauta Sūtra] 18.44:397.9 sqq which has once again been overlooked, not having been translated yet: "Ayu went eastwards. His (people) are the Kuru Panchala and the Kasi-Videha. This is the Ayava (migration). (His other people) stayed at home. His people are the Gandhari, Parsu and Aratta. This is the Amavasava (group)" (Witzel 1989: 235).</blockquote> === Ecological studies: widespread drought, urban collapse, and pastoral migrations === Climate change and drought may have triggered both the initial dispersal of Indo-European speakers, and the migration of Indo-Europeans from the steppes in south central Asia and India. Around 4200–4100 BCE a climate change occurred, manifesting in colder winters in Europe. Steppe herders, archaic Proto-Indo-European speakers, spread into the lower Danube valley about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. The Yamna horizon was an adaptation to a climate change which occurred between 3500 and 3000 BCE, in which the steppes became drier and cooler. Herds needed to be moved frequently to feed them sufficiently, and the use of wagons and horse-back riding made this possible, leading to "a new, more mobile form of pastoralism". In the third millennium BCE widespread aridification led to water shortages and ecological changes in both the Eurasian steppes and the Indian subcontinent. On the steppes, humidification led to a change of vegetation, triggering "higher mobility and transition to nomadic cattle breeding". Water shortage also had a strong impact in the Indian subcontinent, "causing the collapse of sedentary urban cultures in south central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations". == Development of the theory == === Similarities between Sanskrit, Persian, Greek === In the 16th century, European visitors to India became aware of similarities between Indian and European languages and as early as 1653 Van Boxhorn had published a proposal for a proto-language ("Scythian") for Germanic, Romance, Greek, Baltic, Slavic, Celtic, Iranian, and (incorrectly) Turkish. In a memoir sent to the French Academy of Sciences in 1767 Gaston-Laurent Coeurdoux, a French Jesuit who spent all his life in India, had specifically demonstrated the existing analogy between Sanskrit and European languages. In 1786 William Jones, a judge in the Supreme Court of Judicature at Fort William, Calcutta, linguist, and classics scholar, on studying Sanskrit, postulated, in his ''Third Anniversary Discourse'' to the Asiatic Society, a proto-language uniting Sanskrit, Persian, Greek, Latin, Gothic and Celtic languages, but in many ways his work was less accurate than his predecessors', as he erroneously included Egyptian, Japanese and Chinese in the Indo-European languages, while omitting Hindustani and Slavic:<blockquote>The Sanskrit language, whatever be its antiquity, is of a wonderful structure; more perfect than the Greek, more copious than the Latin, and more exquisitely refined than either, yet bearing to both of them a stronger affinity, both in the roots of verbs and in the forms of grammar, than could possibly have been produced by accident; so strong indeed, that no philologer could examine them all three, without believing them to have sprung from some common source, which, perhaps, no longer exists: there is a similar reason, though not quite so forcible, for supposing that both the Gothic and the Celtic, though blended with a very different idiom, had the same origin with the Sanskrit; and the old Persian might be added to the same family, if this were the place for discussing any question concerning the antiquities of Persia.</blockquote>Jones concluded that all these languages originated from the same source. === Homeland === Main article: Proto-Indo-European homeland Scholars assume a homeland either in central Asia or in Western Asia, and Sanskrit must in this case have reached India by a language transfer from west to east. In 19th century Indo-European studies, the language of the Rigveda was the most archaic Indo-European language known to scholars, indeed the only records of Indo-European that could reasonably claim to date to the Bronze Age. This primacy of Sanskrit inspired scholars such as Friedrich Schlegel, to assume that the locus of the proto-Indo-European homeland had been in India, with the other dialects spread to the west by historical migration. With the 20th-century discovery of Bronze-Age attestations of Indo-European (Anatolian, Mycenaean Greek), Vedic Sanskrit lost its special status as the most archaic Indo-European language known. === Aryan "race" === Main articles: Aryan race and Scientific racism In the 1850s Max Müller introduced the notion of two Aryan races, a western and an eastern one, who migrated from the Caucasus into Europe and India respectively. Müller dichotomized the two groups, ascribing greater prominence and value to the western branch. Nevertheless, this "eastern branch of the Aryan race was more powerful than the indigenous eastern natives, who were easy to conquer". Herbert Hope Risley expanded on Müller's two-race Indo-European speaking Aryan invasion theory, concluding that the caste system was a remnant of the Indo-Aryans domination of the native Dravidians, with observable variations in phenotypes between hereditary race-based castes. Thomas Trautmann explains that Risley "found a direct relation between the proportion of Aryan blood and the nasal index, along a gradient from the highest castes to the lowest. This assimilation of caste to race proved very influential." Müller's work contributed to the developing interest in Aryan culture, which often set Indo-European ('Aryan') traditions in opposition to Semitic religions. He was "deeply saddened by the fact that these classifications later came to be expressed in racist terms", as this was far from his intention. For Müller the discovery of common Indian and European ancestry was a powerful argument against racism, arguing that "an ethnologist who speaks of Aryan race, Aryan blood, Aryan eyes and hair, is as great a sinner as a linguist who speaks of a dolichocephalic dictionary or a brachycephalic grammar" and that "the blackest Hindus represent an earlier stage of Aryan speech and thought than the fairest Scandinavians". In his later work, Max Müller took great care to limit the use of the term "Aryan" to a strictly linguistic one. === "Aryan invasion" === The excavation of the Harappa, Mohenjo-daro and Lothal sites of the Indus Valley Civilisation (IVC) in the 1920, showed that northern India already had an advanced culture when the Indo-Aryans migrated into the area. The theory changed from a migration of advanced Aryans towards a primitive aboriginal population, to a migration of nomadic people into an advanced urban civilization, comparable to the Germanic migrations during the Fall of the Western Roman Empire, or the Kassite invasion of Babylonia. This possibility was for a short time seen as a hostile invasion into northern India. The decline of the Indus Valley Civilisation at precisely the period in history in which the Indo-Aryan migrations probably took place, seemed to provide independent support of such an invasion. This argument was proposed by the mid-20th century archaeologist Mortimer Wheeler, who interpreted the presence of many unburied corpses found in the top levels of Mohenjo-daro as the victims of conquest wars, and who famously stated that the god "Indra stands accused" of the destruction of the Civilisation. This position was discarded after finding no evidence of wars. The skeletons were found to be hasty interments, not massacred victims. Wheeler himself also nuanced this interpretation in later publications, stating "This is a possibility, but it can't be proven, and it may not be correct." Wheeler further notes that the unburied corpses may indicate an event in the final phase of human occupation of Mohenjo-Daro, and that thereafter the place was uninhabited, but that the decay of Mohenjo-Daro has to be ascribed to structural causes such as salinisation. Nevertheless, although 'invasion' was discredited, critics of the Indo-Aryan Migration theory continue to present the theory as an "Aryan Invasion Theory", presenting it as a racist and colonialist discourse:<blockquote>The theory of an immigration of IA speaking Arya ("Aryan invasion") is simply seen as a means of British policy to justify their own intrusion into India and their subsequent colonial rule: in both cases, a "white race" was seen as subduing the local darker colored population.</blockquote> === Aryan migration === In the later 20th century, ideas were refined along with data accrual, and migration and acculturation were seen as the methods whereby Indo-Aryans and their language and culture spread into northwest India around 1500 BCE. The term "invasion" is only being used nowadays by opponents<sup>[''who?'']</sup> of the Indo-Aryan Migration theory. Michael Witzel:<blockquote>...it has been supplanted by much more sophisticated models over the past few decades [...] philologists first, and archaeologists somewhat later, noticed certain inconsistencies in the older theory and tried to find new explanations, a new version of the immigration theories.</blockquote>The changed approach was in line with newly developed thinking about language transfer in general, such as the migration of the Greeks into Greece (between 2100 and 1600 BCE) and their adoption of a syllabic script, Linear B, from the pre-existing Linear A, with the purpose of writing Mycenaean Greek, or the Indo-Europeanization of Western Europe (in stages between 2200 and 1300 BCE). == Linguistics: relationships between languages == Linguistic research traces the connections between the various Indo-European languages, and reconstructs proto-Indo-European. Accumulated linguistic evidence points to the Indo-Aryan languages as intrusive into the Indian subcontinent, some time in the 2nd millennium BCE. The language of the Rigveda, the earliest stratum of Vedic Sanskrit, is assigned to about 1500–1200 BCE. === Comparative method === Main article: Comparative method Connections between languages can be traced because the processes that change languages are not random, but follow strict patterns. Especially sound shifts, the changing of vowels and consonants, are important, although grammar (especially morphology) and the lexicon (vocabulary) may also be significant. Historical-comparative linguistics thus makes it possible to see great similarities between languages which at first sight might seem very different. Linguistics use the comparative method to study the development of languages by performing a feature-by-feature comparison of two or more languages with common descent from a shared ancestor, as opposed to the method of internal reconstruction, which analyses the internal development of a single language over time. Ordinarily both methods are used together to reconstruct prehistoric phases of languages, to fill in gaps in the historical record of a language, to discover the development of phonological, morphological, and other linguistic systems, and to confirm or refute hypothesized relationships between languages.<sup>[''citation needed'']</sup> The comparative method aims to prove that two or more historically attested languages are descended from a single proto-language by comparing lists of cognate terms. From them, regular sound correspondences between the languages are established, and a sequence of regular sound changes can then be postulated, which allows the proto-language to be reconstructed. Relation is deemed certain only if at least a partial reconstruction of the common ancestor is feasible, and if regular sound correspondences can be established with chance similarities ruled out.<sup>[''citation needed'']</sup> The comparative method was developed over the 19th century. Key contributions were made by the Danish scholars Rasmus Rask and Karl Verner and the German scholar Jacob Grimm. The first linguist to offer reconstructed forms from a proto-language was August Schleicher, in his ''Compendium der vergleichenden Grammatik der indogermanischen Sprachen'', originally published in 1861. === Proto-Indo-European === Proto-Indo-European (PIE) is the linguistic reconstruction of the common ancestor of the Indo-European languages. August Schleicher's 1861 reconstruction of PIE was the first proposed proto-language to be accepted by modern linguists. More work has gone into reconstructing it than any other proto-language, and it is by far the best understood among all proto-languages of its age. During the 19th century, the vast majority of linguistic work was devoted to reconstruction of Proto-Indo-European or its daughter proto-languages such as Proto-Germanic, and most of the current techniques of linguistic reconstruction in historical linguistics (e.g., the comparative method and the method of internal reconstruction) were developed as a result. PIE must have been spoken as a single language or a group of related dialects (before divergence began), though estimates of when this was by different authorities can vary massively, from the 7th millennium BCE to the second. A number of hypotheses have been proposed for the origin and spread of the language, the most popular among linguists being the Kurgan hypothesis, which postulates an origin in the Pontic–Caspian steppe of Eastern Europe in the 5th or 4th millennia BCE. Features of the culture of the speakers of PIE, known as Proto-Indo-Europeans, have also been reconstructed based on the shared vocabulary of the early attested Indo-European languages. As mentioned above, the existence of PIE was first postulated in the 18th century by Sir William Jones, who observed the similarities between Sanskrit, Ancient Greek, and Latin. By the early 20th century, well-defined descriptions of PIE had been developed that are still accepted today (with some refinements). The largest developments of the 20th century were the discovery of the Anatolian and Tocharian languages and the acceptance of the laryngeal theory. The Anatolian languages have also spurred a major re-evaluation of theories concerning the development of various shared Indo-European language features and the extent to which these features were present in PIE itself.<sup>[''citation needed'']</sup> Relationships to other language families, including the Uralic languages, have been proposed but remain controversial.<sup>[''citation needed'']</sup> PIE is thought<sup>[''by whom?'']</sup> to have had a complex system of morphology that included inflectional suffixes as well as ablaut (vowel alterations, as preserved in English ''sing, sang, sung''). Nouns and verbs had complex systems of declension and conjugation respectively.<sup>[''citation needed'']</sup> === Arguments against an Indian origin of proto-Indo-European === ==== Diversity ==== According to the linguistic center of gravity principle, the most likely point of origin of a language family is in the area of its greatest diversity. By this criterion, Northern India, home to only a single branch of the Indo-European language family (i.e., Indo-Aryan), is an exceedingly unlikely candidate for the Indo-European homeland, compared to Central-Eastern Europe, for example, which is home to the Italic, Venetic, Illyrian, Albanian, Germanic, Baltic, Slavic, Thracian and Greek branches of Indo-European. Both mainstream Urheimat solutions locate the Proto-Indo-European homeland in the vicinity of the Black Sea. ==== Dialectal variation ==== {| class="wikitable" | |This section '''may be too technical for most readers to understand'''. Please help improve it to make it understandable to non-experts, without removing the technical details. ''(August 2020) (<small>Learn how and when to remove this template message</small>)'' |} It has been recognized since the mid-19th century, beginning with Schmidt and Schuchardt, that a binary tree model cannot capture all linguistic alignments; certain areal features cut across language groups and are better explained through a model treating linguistic change like waves rippling out through a pond. This is true of the Indo-European languages as well. Various features originated and spread while Proto-Indo-European was still a dialect continuum. These features sometimes cut across sub-families: for instance, the instrumental, dative and ablative plurals in Germanic and Balto-Slavic feature endings beginning with -m-, rather than the usual -*bh-, e.g. Gothic dative plural ''sunum'' 'to the sons' and Old Church Slavonic instrumental plural ''synъ-mi'' 'with sons', despite the fact that the Germanic languages are centum, while Balto-Slavic languages are satem. The strong correspondence between the dialectal relationships of the Indo-European languages and their actual geographical arrangement in their earliest attested forms makes an Indian origin, as suggested by the Out of India Theory, unlikely. ==== Substrate influence ==== Main article: Substratum in Vedic Sanskrit Already in the 1870s the Neogrammarians<sup>[''who?'']</sup> realised that the Greek/Latin vocalism couldn't be explained on the basis of the Sanskrit one, and therefore must be more original.<sup>[''citation needed'']</sup> The Indo-Iranian and Uralic languages influenced each other, with the Finno-Ugric languages containing Indo-European loan words. A telling example is the Finnish word ''vasara'', "hammer", which is related to ''vajra'', the weapon of Indra. Since the Finno-Ugric homeland was located in the northern forest zone in northern Europe, the contacts must have taken place – in line with the placement of the proto-Indo-European homeland at the Pontic-Caspian steppes – between the Black Sea and the Caspian Sea. Dravidian and other South Asian languages share with Indo-Aryan a number of syntactical and morphological features that are alien to other Indo-European languages, including even its closest relative, Old Iranian. Phonologically, there is the introduction of retroflexes, which alternate with dentals in Indo-Aryan; morphologically there are the gerunds; and syntactically there is the use of a quotative marker (''iti''). These are taken as evidence of substratum influence. It has been argued<sup>[''by whom?'']</sup> that Dravidian influenced Indic through "shift", whereby native Dravidian speakers learned and adopted Indic languages.<sup>[''citation needed'']</sup> The presence of Dravidian structural features in Old Indo-Aryan is thus plausibly explained, that the majority of early Old Indo-Aryan speakers had a Dravidian mother tongue which they gradually abandoned. Even though the innovative traits in Indic could be explained by multiple internal explanations, early Dravidian influence is the only explanation that can account for all of the innovations at once – it becomes a question of explanatory parsimony; moreover, early Dravidian influence accounts for several of the innovative traits in Indic better than any internal explanation that has been proposed. A pre-Indo-European linguistic substratum in the Indian subcontinent would be a good reason to exclude India as a potential Indo-European homeland. However, several linguists<sup>[''who?'']</sup>, all of whom accept the external origin of the Aryan languages on other grounds, are still open to considering the evidence as internal developments rather than the result of substrate influences, or as adstratum effects. == Archaeology: migrations from the steppe Urheimat == See also: Indo-European migrations {| class="wikitable" | {| class="wikitable mw-collapsible mw-collapsed" !Indo-European migration |} |- | {| class="wikitable mw-collapsible mw-collapsed" !Spread of IE-languages |} |} The Sintashta, Andronovo, Bactria-Margiana and Yaz cultures have been associated with Indo-Iranian migrations in Central Asia. The Gandhara Grave, Cemetery H, Copper Hoard and Painted Grey Ware cultures are candidates for subsequent cultures within South Asia associated with Indo-Aryan movements.<sup>[''needs context'']</sup> The decline of the Indus Valley Civilisation predates the Indo-Aryan migrations, but archeological data show a cultural continuity in the archeological record. Together with the presence of Dravidian loanwords in the Rigveda, this<sup>[''clarification needed'']</sup> argues in favor of an interaction between post-Harappan and Indo-Aryan cultures. === Stages of migrations === About 6,000 years ago the Indo-Europeans started to spread out from their proto-Indo-European homeland in Central Eurasia, between the southern Ural Mountains, the North Caucasus, and the Black Sea. About 4,000 years ago Indo-European speaking peoples started to migrate out of the Eurasian steppes. ==== Diffusion from the "Urheimat" ==== Main articles: Proto-Indo-European homeland, Kurgan hypothesis, and Yamnaya culture Scholars regard the middle Volga, which was the location of the Samara culture (late 6th and early 5th millennium BCE), and the Yamna culture, to be the "Urheimat" of the Indo-Europeans, as described by the Kurgan hypothesis. From this "Urheimat", Indo-European languages spread throughout the Eurasian steppes between c. 4,500 and 2,500 BCE, forming the Yamna culture. ==== Sequence of migrations ==== David Anthony gives an elaborate overview of the sequence of migrations. The oldest attested Indo-European language is Hittite, which belongs to the oldest written Indo-European languages, the Anatolian branch. Although the Hittites are placed in the 2nd millennium BCE, the Anatolian branch seems to predate Proto-Indo-European, and may have developed from an older Pre-Proto-Indo-European ancestor. If it separated from Proto-Indo-European, it is likely to have done so between 4500 and 3500 BCE. A migration of archaic Proto-Indo-European speaking steppe herders into the lower Danube valley took place about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. According to Mallory and Adams, migrations southward founded the Maykop culture (c. 3500–2500 BCE), and eastward the Afanasevo culture (c. 3500–2500 BCE), which developed into the Tocharians (c. 3700–3300 BCE). According to Anthony, between 3100 and 2800/2600 BCE, a real folk migration of Proto-Indo-European speakers from the Yamna-culture took place toward the west, into the Danube Valley. These migrations probably split off Pre-Italic, Pre-Celtic and Pre-Germanic from Proto-Indo-European. According to Anthony, this was followed by a movement north, which split away Baltic-Slavic c. 2800 BCE. Pre-Armenian split off at the same time. According to Parpola, this migration is related to the appearance of Indo-European speakers from Europe in Anatolia, and the appearance of Hittite. The Corded Ware culture in Middle Europe ( 2900–2450/2350 cal. BCE), has been associated with some of the languages in the Indo-European family. According to Haak et al. (2015) a massive migration took place from the Eurasian steppes to Central Europe. This migration is closely associated with the Corded Ware culture. The Indo-Iranian language and culture emerged in the Sintashta culture (c. 2050–1900 BCE), where the chariot was invented. Allentoft et al. (2015) found close autosomal genetic relationship between peoples of Corded Ware culture and Sintashta culture, which "suggests similar genetic sources of the two", and may imply that "the Sintashta derives directly from an eastward migration of Corded Ware peoples". The Indo-Iranian language and culture was further developed in the Andronovo culture (c. 2000–1450 BCE), and influenced by the Bactria–Margiana Archaeological Complex (c. 2250–1700 BCE). The Indo-Aryans split off sometime around 2000–1600 BCE from the Iranians, after which Indo-Aryan groups are thought to have moved to the Levant (Mitanni), the northern Indian subcontinent (Vedic people, c. 1500 BCE), and China (Wusun). Thereafter the Iranians migrated into Iran. === Central Asia: formation of Indo-Iranians === Indo-Iranian peoples are a grouping of ethnic groups consisting of the Indo-Aryan, Iranian and Nuristani peoples; that is, speakers of Indo-Iranian languages. The Proto-Indo-Iranians are commonly identified with the Andronovo culture, that flourished c. 2000–1450 BCE in an area of the Eurasian Steppe that borders the Ural River on the west, the Tian Shan on the east. The older Sintashta culture (2200–1900), formerly included within the Andronovo culture, is now considered separately, but regarded as its predecessor, and accepted as part of the wider Andronovo horizon. The Indo-Aryan migration was part of the Indo-Iranian migrations from the Andronovo culture into Anatolia, Iran and South Asia. ==== Sintashta-Petrovka culture ==== Main article: Sintashta culture The Sintashta culture, also known as the Sintashta-Petrovka culture or Sintashta-Arkaim culture, is a Bronze Age archaeological culture of the northern Eurasian Steppe on the borders of Eastern Europe and Central Asia, dated to the period 2200–1900 BCE. The Sintashta culture is probably the archaeological manifestation of the Indo-Iranian language group. The Sintashta culture emerged from the interaction of two antecedent cultures. Its immediate predecessor in the Ural-Tobol steppe was the Poltavka culture, an offshoot of the cattle-herding Yamnaya horizon that moved east into the region between 2800 and 2600 BCE. Several Sintashta towns were built over older Poltovka settlements or close to Poltovka cemeteries, and Poltovka motifs are common on Sintashta pottery. Sintashta material culture also shows the influence of the late Abashevo culture, a collection of Corded Ware settlements in the forest steppe zone north of the Sintashta region that were also predominantly pastoralist. Allentoft et al. (2015) also found close autosomal genetic relationship between peoples of Corded Ware culture and Sintashta culture. The earliest known chariots have been found in Sintashta burials, and the culture is considered a strong candidate for the origin of the technology, which spread throughout the Old World and played an important role in ancient warfare. Sintashta settlements are also remarkable for the intensity of copper mining and bronze metallurgy carried out there, which is unusual for a steppe culture. Because of the difficulty of identifying the remains of Sintashta sites beneath those of later settlements, the culture was only recently distinguished from the Andronovo culture. It is now recognised as a separate entity forming part of the 'Andronovo horizon'. ==== Andronovo culture ==== Main article: Andronovo culture The Andronovo culture is a collection of similar local Bronze Age Indo-Iranian cultures that flourished <abbr>c.</abbr> 2000–1450 BC in western Siberia and the central Eurasian Steppe. It is probably better termed an archaeological complex or archaeological horizon. The name derives from the village of Andronovo (55°53′N 55°42′E), where in 1914, several graves were discovered, with skeletons in crouched positions, buried with richly decorated pottery. The older Sintashta culture (2050–1900 BCE), formerly included within the Andronovo culture, is now considered<sup>[''by whom?'']</sup> separately, but regarded as its predecessor, and accepted as part of the wider Andronovo horizon. Currently only two sub-cultures are considered as part of Andronovo culture: * '''Alakul''' (2000–1700 BC) between Oxus (today Amu Darya), and Jaxartes, Kyzylkum desert * '''Fëdorovo''' (2000–1450 BC) in southern Siberia (earliest evidence of cremation and fire cult) Other authors identified previously the following sub-cultures also as part of Andronovo: * '''Eastern Fedorovo''' (1750–1500 BC) in Tian Shan mountains (Northwestern Xinjiang, China), southeastern Kazakhstan, eastern Kyrgyzstan * '''Alekseyevka''' (1200–1000 BC) "final Bronze Age phase" in eastern Kazakhstan, contacts with Namazga VI in Turkmenia The geographical extent of the culture is vast and difficult to delineate exactly. On its western fringes, it overlaps with the approximately contemporaneous, but distinct, Srubna culture in the Volga–Ural interfluvial. To the east, it reaches into the Minusinsk depression, with some sites as far west as the southern Ural Mountains, overlapping with the area of the earlier Afanasevo culture. Additional sites are scattered as far south as the Kopet Dag (Turkmenistan), the Pamir (Tajikistan) and the Tian Shan (Kyrgyzstan). The northern boundary vaguely corresponds to the beginning of the Taiga. In the Volga basin, interaction with the Srubna culture was the most intense and prolonged, and Federovo style pottery is found as far west as Volgograd. Towards the middle of the 2nd millennium, the Andronovo cultures begin to move intensively eastwards. They mined deposits of copper ore in the Altai Mountains and lived in villages of as many as ten sunken log cabin houses measuring up to 30m by 60m in size. Burials were made in stone cists or stone enclosures with buried timber chambers. In other respects, the economy was pastoral, based on cattle, horses, sheep, and goats. While agricultural use has been posited,<sup>[''by whom?'']</sup> no clear evidence has been presented. Studies associate the Andronovo horizon with early Indo-Iranian languages, though it may have overlapped the early Uralic-speaking area at its northern fringe, including the Turkic-speaking area at its northeastern fringe. Based on its use by Indo-Aryans in Mitanni and Vedic India, its prior absence in the Near East and Harappan India, and its 19–20th century BCE attestation at the Andronovo site of Sintashta, Kuz'mina (1994) argues that the chariot corroborates the identification of Andronovo as Indo-Iranian. Anthony & Vinogradov (1995) dated a chariot burial at Krivoye Lake to about 2000 BCE and a Bactria-Margiana burial that also contains a foal has recently been found, indicating further links with the steppes. Mallory acknowledges the difficulties of making a case for expansions from Andronovo to northern India, and that attempts to link the Indo-Aryans to such sites as the Beshkent and Vakhsh cultures "only gets the Indo-Iranian to Central Asia, but not as far as the seats of the Medes, Persians or Indo-Aryans". He has developed the "kulturkugel" model that has the Indo-Iranians taking over Bactria-Margiana cultural traits but preserving their language and religion<sup>[''contradictory'']</sup> while moving into Iran and India. Fred Hiebert also agrees that an expansion of the BMAC into Iran and the margin of the Indus Valley is "the best candidate for an archaeological correlate of the introduction of Indo-Iranian speakers to Iran and South Asia." According to Narasimhan et al. (2018), the expansion of the Andronovo culture towards the BMAC took place via the Inner Asia Mountain Corridor. ==== Bactria-Margiana culture ==== Main article: Bactria–Margiana Archaeological Complex The Bactria-Margiana Culture, also called "Bactria-Margiana Archaeological Complex", was a non-Indo-European culture which influenced the Indo-Iranians. It was centered in what is nowadays northwestern Afghanistan and southern Turkmenistan. Proto-Indo-Iranian arose due to this influence. The Indo-Iranians also borrowed their distinctive religious beliefs<sup>[''contradictory'']</sup> and practices from this culture. According to Anthony, the Old Indic religion probably emerged among Indo-European immigrants in the contact zone between the Zeravshan River (present-day Uzbekistan) and (present-day) Iran. It was "a syncretic mixture of old Central Asian and new Indo-European elements", which borrowed "distinctive religious beliefs and practices" from the Bactria–Margiana culture. At least 383 non-Indo-European words were borrowed from this culture, including the god Indra and the ritual drink Soma. The characteristically Bactria-Margiana (southern Turkmenistan/northern Afghanistan) artifacts found at burials in Mehrgarh and Balochistan are explained by a movement of peoples from Central Asia to the south. The Indo-Aryan tribes may have been present in the area of the BMAC from 1700 BCE at the latest (incidentally corresponding with the decline of that culture). From the BMAC, the Indo-Aryans moved into the Indian subcontinent. According to Bryant, the Bactria-Margiana material inventory of the Mehrgarh and Baluchistan burials is "evidence of an archaeological intrusion into the subcontinent from Central Asia during the commonly accepted time frame for the arrival of the Indo-Aryans". ==== Multiple waves of migration into northern India ==== See also: Inner–Outer hypothesis According to Parpola, Indo-Aryan clans migrated into South Asia in subsequent waves. This explains the diversity of views found in the Rig Veda, and may also explain the existence of various Indo-Aryan cultural complexes in the later Vedic period, namely the Vedic culture centered on the Kuru Kingdom in the heartland of Aryavarta in the western Ganges plain, and the cultural complex of Greater Magadha at the eastern Ganges plain, which gave rise to Jainism and Buddhism. Writing in 1998, Parpola postulated a first wave of immigration from as early as 1900 BCE, corresponding to the Cemetery H culture and the Copper Hoard culture, c.q. Ochre Coloured Pottery culture, and an immigration to the Punjab . 1700–1400 BCE. In 2020, Parpola proposed an even earlier wave of proto-Indo-Iranian speaking people from the Sintashta culture into India at c. 1900 BCE, related to the Copper Hoard Culture, followed by a pre-Rig Vedic Indo-Aryan wave of migration:<blockquote>It seems, then, that the earliest Aryan-speaking immigrants to South Asia, the Copper Hoard people, came with bull-drawn carts (Sanauli and Daimabad) via the BMAC and had Proto-Indo-Iranian as their language. They were, however, soon followed (and probably at least partially absorbed) by early Indo-Aryans.</blockquote>This pre-Rig-Vedic wave of migration by early Indo-Aryans is associated by Parpola with "the early (Ghalegay IV–V) phase of the Gandhara Grave culture" and the Atharva Veda tradition, and related to the Petrovka culture. The Rig-Vedic wave followed several centuries later, "perhaps in the fourteenth century BCE", and is associated by Parpola with the Fedorovo culture. According to Kochhar there were three waves of Indo-Aryan immigration that occurred after the mature Harappan phase: # the "Murghamu" (Bactria-Margiana culture) related people who entered Balochistan at Pirak, Mehrgarh south cemetery, and other places, and later merged with the post-urban Harappans during the late Harappans Jhukar phase (2000–1800 BCE); # the Swat IV that co-founded the Harappan Cemetery H phase in Punjab (2000–1800 BCE); # and the Rigvedic Indo-Aryans of Swat V that later absorbed the Cemetery H people and gave rise to the Painted Grey Ware culture (PGW) (to 1400 BCE). ===== Gandhara grave culture and Ochre Coloured Pottery culture ===== Main articles: Gandhara grave culture and Ochre Coloured Pottery culture The standard model<sup>[''by whom?'']</sup> for the entry of the Indo-European languages into India is that Indo-Aryan migrants went over the Hindu Kush, forming the Gandhara grave culture or Swat culture, in present-day Swat valley, into the headwaters of either the Indus or the Ganges (probably both). The Gandhara grave culture, which emerged c. 1600 BCE and flourished from c. 1500 BCE to 500 BCE in Gandhara, modern-day Pakistan and Afghanistan, is thus the most likely locus of the earliest bearers of Rigvedic culture. About 1800 BCE, there is a major cultural change in the Swat Valley with the emergence of the Gandhara grave culture. With its introduction of new ceramics, new burial rites, and the horse, the Gandhara grave culture is a major candidate for early Indo-Aryan presence. The two new burial rites—flexed inhumation in a pit and cremation burial in an urn—were, according to early Vedic literature, both practiced in early Indo-Aryan society. Horse-trappings indicate the importance of the horse to the economy of the Gandharan grave culture. Two horse burials indicate the importance of the horse in other respects. Horse burial is a custom that Gandharan grave culture has in common with Andronovo, though not within the distinctive timber-frame graves of the steppe. Parpola (2020) states:<blockquote>The dramatic new discovery of cart burials dated to c. 1900 at Sinauli have been reviewed in this paper, and they support my proposal of a pre-Ṛvedic wave (now set of waves) of Aryan speakers arriving in South Asia and their making contact with the Late Harappans.</blockquote> === Two waves of Indo-Iranian migration === See also: Indo-Iranians The Indo-Iranian migrations took place in two waves, belonging to the second and the third stage of Beckwith's description of the Indo-European migrations. The first wave consisted of the Indo-Aryan migration into the Levant, seemingly founding the Mitanni kingdom in northern Syria (c. 1600–1350 BCE), and the migration south-eastward of the Vedic people, over the Hindu Kush into northern India. Christopher I. Beckwith suggests that the Wusun, an Indo-European Europoid people of Inner Asia in antiquity, were also of Indo-Aryan origin. The second wave is interpreted as the Iranian wave. === First wave – Indo-Aryan migrations === ==== Mittani ==== Main article: Mitanni Mitanni (Hittite cuneiform ''KUR<sup>URU</sup>Mi-ta-an-ni''), also Mittani (''Mi-it-ta-ni'') or Hanigalbat (Assyrian Hanigalbat, Khanigalbat cuneiform ''Ḫa-ni-gal-bat'') or Naharin in ancient Egyptian texts was a Hurrian-speaking state in northern Syria and south-east Anatolia from <abbr>c.</abbr> 1600 BCE – 1350 BCE. According to one hypothesis, founded by an Indo-Aryan ruling class governing a predominately Hurrian population, Mitanni came to be a regional power after the Hittite destruction of Amorite Babylon and a series of ineffectual Assyrian kings created a power vacuum in Mesopotamia. At the beginning of its history, Mitanni's major rival was Egypt under the Thutmosids. However, with the ascent of the Hittite empire, Mitanni and Egypt made an alliance to protect their mutual interests from the threat of Hittite domination.<sup>[''citation needed'']</sup> At the height of its power, during the 14th century BCE, Mitanni had outposts centered on its capital, Washukanni, whose location has been determined by archaeologists to be on the headwaters of the Khabur River. Their sphere of influence is shown in Hurrian place names, personal names and the spread through Syria and the Levant of a distinct pottery type. Eventually, Mitanni succumbed to Hittite and later Assyrian attacks, and was reduced to the status of a province of the Middle Assyrian Empire.<sup>[''citation needed'']</sup> The earliest written evidence for an Indo-Aryan language is found not in Northwestern India and Pakistan, but in northern Syria, the location of the Mitanni kingdom. The Mitanni kings took Old Indic throne names, and Old Indic technical terms were used for horse-riding and chariot-driving. The Old Indic term r'ta, meaning "cosmic order and truth", the central concept of the Rigveda, was also employed in the Mitanni kingdom. Old Indic gods, including Indra, were also known in the Mitanni kingdom. ==== North-India – Vedic culture ==== {| class="wikitable mw-collapsible mw-collapsed" !Spread of Vedic culture |} ===== Spread of Vedic-Brahmanic culture ===== Main article: Vedic period During the Early Vedic Period (c. 1500–800 BCE) the Indo-Aryan culture was centered in the northern Punjab, or Sapta Sindhu. During the Later Vedic Period (c. 800–500 BCE) the Indo-Aryan culture started to extend into the western Ganges Plain, centering on the Vedic Kuru and Panchala area, and had some influence at the central Ganges Plain after 500 BCE. Sixteen Mahajanapada developed at the Ganges Plain, of which the Kuru and Panchala became the most notable developed centers of Vedic culture, at the western Ganges Plain. The Central Ganges Plain, where Magadha gained prominence, forming the base of the Maurya Empire, was a distinct cultural area, with new states arising after 500 BCE during the so-called "Second urbanisation". It was influenced by the Vedic culture, but differed markedly from the Kuru-Panchala region. It "was the area of the earliest known cultivation of rice in the Indian subcontinent and by 1800 BCE was the location of an advanced neolithic population associated with the sites of Chirand and Chechar". In this region the Shramanic movements flourished, and Jainism and Buddhism originated. ==== Indus Valley Civilization ==== The Indo-Aryan migration into the northern Punjab started shortly after the decline of the Indus Valley civilisation (IVC). According to the "Aryan Invasion Theory" this decline was caused by "invasions" of barbaric and violent Aryans who conquered the IVC. This "Aryan Invasion Theory" is not supported by the archeological and genetic data, and is not representative of the "Indo-Aryan migration theory".<sup>[''citation needed'']</sup> ===== Decline of Indus Valley Civilisation ===== The decline of the IVC from about 1900 BCE started before the onset of the Indo-Aryan migrations, caused by aridisation due to shifting mossoons. A regional cultural discontinuity occurred during the second millennium BCE and many Indus Valley cities were abandoned during this period, while many new settlements began to appear in Gujarat and East Punjab and other settlements such as in the western Bahawalpur region increased in size.<sup>[''citation needed'']</sup> Jim G. Shaffer and Lichtenstein contend that in the second millennium BCE considerable "location processes" took place. In the eastern Punjab 79.9% and in Gujarat 96% of sites changed settlement status. According to Shaffer & Lichtenstein,<blockquote>It is evident that a major geographic population shift accompanied this 2nd millennium BCE localisation process. This shift by Harappan and, perhaps, other Indus Valley cultural mosaic groups, is the only archaeologically documented west-to-east movement of human populations in the Indian subcontinent before the first half of the first millennium B.C.</blockquote> ===== Continuity of Indus Valley civilization ===== According to Erdosy, the ancient Harappans were not markedly different from modern populations in Northwestern India and present-day Pakistan. Craniometric data showed similarity with prehistoric peoples of the Iranian plateau and Western Asia, although Mohenjo-daro was distinct from the other areas of the Indus Valley. According to Kennedy, there is no evidence of "demographic disruptions" after the decline of the Harappa culture. Kenoyer notes that no biological evidence can be found for major new populations in post-Harappan communities. Hemphill notes that "patterns of phonetic affinity" between Bactria and the Indus Valley Civilisation are best explained by "a pattern of long-standing, but low-level bidirectional mutual exchange". According to Kennedy, the Cemetery H culture "shows clear biological affinities" with the earlier population of Harappa. The archaeologist Kenoyer noted that this culture "may only reflect a change in the focus of settlement organization from that which was the pattern of the earlier Harappan phase and not cultural discontinuity, urban decay, invading aliens, or site abandonment, all of which have been suggested in the past." Recent excavations in 2008 at Alamgirpur, Meerut District, appeared to show an overlap between the Harappan and Painted Grey Ware culture (PGW) pottery indicating cultural continuity. ===== Relation with Indo-Aryan migrations ===== According to Kenoyer, the decline of the Indus Valley Civilisation is not explained by Aryan migrations, which took place after the decline of the Indus Valley Civilisation. Yet, according to Erdosy,<blockquote>Evidence in material culture for systems collapse, abandonment of old beliefs and large-scale, if localised, population shifts in response to ecological catastrophe in the 2nd millennium B.C. must all now be related to the spread of Indo-Aryan languages.</blockquote>Erdosy, testing hypotheses derived from linguistic evidence against hypotheses derived from archaeological data, states that there is no evidence of "invasions by a barbaric race enjoying technological and military superiority", but "some support was found in the archaeological record for small-scale migrations from Central Asia to the Indian subcontinent in the late 3rd/early 2nd millennia BCE". According to Erdosy, the postulated movements within Central Asia can be placed within a processional framework, replacing simplistic concepts of "diffusion", "migrations" and "invasions". Scholars have argued that the historical Vedic culture is the result of an amalgamation of the immigrating Indo-Aryans with the remnants of the indigenous civilization, such as the Ochre Coloured Pottery culture. Such remnants of IVC culture are not prominent in the Rigveda, with its focus on chariot warfare and nomadic pastoralism in stark contrast with an urban civilization.<sup>[''citation needed'']</sup> ==== Inner Asia – Wusun and Yuezhi ==== Main articles: Wusun and Yuezhi According to Christopher I. Beckwith the Wusun, an Indo-European Caucasian people of Inner Asia in antiquity, were also of Indo-Aryan origin. From the Chinese term Wusun, Beckwith reconstructs the Old Chinese *âswin, which he compares to the Old Indic aśvin "the horsemen", the name of the Rigvedic twin equestrian gods. Beckwith suggests that the Wusun were an eastern remnant of the Indo-Aryans, who had been suddenly pushed to the extremeties of the Eurasian Steppe by the Iranian peoples in the 2nd millennium BCE. The Wusun are first mentioned<sup>[''when?'']</sup> by Chinese sources as vassals in the Tarim Basin of the Yuezhi, another Indo-European Caucasian people of possible Tocharian stock. Around 175 BCE, the Yuezhi were utterly defeated by the Xiongnu, also former vassals of the Yuezhi. The Yuezhi subsequently attacked the Wusun and killed their king (Kunmo Chinese: 昆莫 or Kunmi Chinese: 昆彌) Nandoumi (Chinese: 難兜靡), capturing the Ili Valley from the Saka (Scythians) shortly afterwards. In return the Wusun settled in the former territories of the Yuezhi as vassals of the Xiongnu. The son of Nandoumi was adopted by the Xiongnu king and made leader of the Wusun. Around 130 BCE he attacked and utterly defeated the Yuezhi, settling the Wusun in the Ili Valley. After the Yuezhi were defeated by the Xiongnu, in the 2nd century BCE, a small group, known as the Little Yuezhi, fled to the south, while the majority migrated west to the Ili Valley, where they displaced the Sakas (Scythians). Driven from the Ili Valley shortly afterwards by the Wusun, the Yuezhi migrated to Sogdia and then Bactria, where they are often identified with the ''Tókharoi'' (Τοχάριοι) and ''Asii'' of Classical sources. They then expanded into northern Indian subcontinent, where one branch of the Yuezhi founded the Kushan Empire. The Kushan empire stretched from Turpan in the Tarim Basin to Pataliputra on the Indo-Gangetic Plain at its greatest extent, and played an important role in the development of the Silk Road and the transmission of Buddhism to China. Soon after 130 BCE the Wusun became independent of the Xiongnu, becoming trusted vassals of the Han dynasty and powerful force in the region for centuries. With the emerging steppe federations of the Rouran, the Wusun migrated into the Pamir Mountains in the 5th century CE. They are last mentioned in 938 when a Wusun chieftain paid tribute to the Liao dynasty. === Second wave – Iranians === {| class="wikitable" | |This section '''does not cite any sources'''. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. ''(August 2020) (<small>Learn how and when to remove this template message</small>)'' |} The first Iranians to reach the Black Sea may have been the Cimmerians in the 8th century BCE, although their linguistic affiliation is uncertain. They were followed by the Scythians<sup>[''when?'']</sup>, who would dominate the area, at their height, from the Carpathian Mountains in the west, to the easternmost fringes of Central Asia in the east. For most of their existence, the Scythians were based in what is modern-day Ukraine and southern European Russia. Sarmatian tribes, of whom the best known are the Roxolani (Rhoxolani), Iazyges (Jazyges) and the Alans, followed the Scythians westwards into Europe in the late centuries BCE and the 1st and 2nd centuries of the Common Era (The Migration Period). The populous Sarmatian tribe of the Massagetae, dwelling near the Caspian Sea, were known to the early rulers of Persia in the Achaemenid Period. In the east, the Scythians occupied several areas in Xinjiang, from Khotan to Tumshuq. The Medes, Parthians and Persians begin to appear on the western Iranian Plateau from c. 800 BCE, after which they remained under Assyrian rule for several centuries, as it was with the rest of the peoples in the Near East. The Achaemenids replaced Median rule from 559 BCE. Around the first millennium of the Common Era (AD), the Kambojas, the Pashtuns and the Baloch began to settle on the eastern edge of the Iranian Plateau, on the mountainous frontier of northwestern and western Pakistan, displacing the earlier Indo-Aryans from the area. In Central Asia, the Turkic languages have marginalized Iranian languages as a result of the Turkic migration of the early centuries CE. In Eastern Europe, Slavic and Germanic peoples assimilated and absorbed the native Iranian languages (Scythian and Sarmatian) of the region. Extant major Iranian languages are Persian, Pashto, Kurdish, and Balochi, besides numerous smaller ones. == Anthropology: elite recruitment and language shift == See also: Language shift === Elite dominance === Small groups can change a larger cultural area, and elite male dominance by small groups may have led to a language shift in northern India. Thapar notes that Indo-Aryan chiefs may have provided protection to non-Aryan agriculturalists, offering a system of patronage placing the chiefs in a superior position. This would have involved bilingualism, resulting in the adoption of Indo-Aryan languages by local populations. According to Parpola, local elites joined "small but powerful groups" of Indo-European speaking migrants. These migrants had an attractive social system and good weapons, and luxury goods which marked their status and power. Joining these groups was attractive for local leaders, since it strengthened their position, and gave them additional advantages. These new members were further incorporated by matrimonial alliances. === Renfrew: models of "linguistic replacement" === Basu et al. refer to Renfrew, who described four models for "linguistic replacement": # The demographic-subsistence model, exemplified by the process of agricultural dispersal, in which the incoming group has exploitive technologies which makes them dominant. It may lead to significant gene flow, and significant genetic changes in the population. But it may also lead to acculturalisation, in which case the technologies are taken over, but there is less change in the genetic composition of the population; # The existence of extended trading systems which led to the development of a lingua franca, in which case some gene flow is to be expected; # The elite dominance model, in which "a relatively small but well-organized group [...] take[s] over the system". Given the small size of the elite, its genetic influence may also be small, though "preferential access to marriage partners" may result in a relatively strong influence on the gene pool. Sexual asymmetry may also be of influence: incoming elites often consist mostly of males, who have no influence on the mitochondrial DNA of the gene pool, but may influence the Y chromosomes of the gene pool; # System collapse, in which territorial boundaries are changed, and elite dominance may appear for a while. === David Anthony: elite recruitment === David Anthony, in his "revised Steppe hypothesis" notes that the spread of the Indo-European languages probably did not happen through "chain-type folk migrations", but by the introduction of these languages by ritual and political elites, which are emulated by large groups of people. Anthony gives the example of the Southern Luo-speaking Acholi in northern Uganda in the 17th and 18th century, whose language spread rapidly in the 19th century. Anthony notes that "Indo-European languages probably spread in a similar way among the tribal societies of prehistoric Europe", carried forward by "Indo-European chiefs" and their "ideology of political clientage". Anthony notes that "elite recruitment" may be a suitable term for this system. === Michael Witzel: small groups and acculturation === Michael Witzel refers to Ehret's model "which stresses the osmosis, or a 'billiard ball', or Mallory's ''Kulturkugel'', effect of cultural transmission". According to Ehret, ethnicity and language can shift with relative ease in small societies, due to the cultural, economic and military choices made by the local population in question. The group bringing new traits may initially be small, contributing features that can be fewer in number than those of the already local culture. The emerging combined group may then initiate a recurrent, expansionist process of ethnic and language shift. Witzel notes that "arya/ārya does not mean a particular 'people' or even a particular 'racial' group but all those who had joined the tribes speaking Vedic Sanskrit and adhering to their cultural norms (such as ritual, poetry, etc.)." According to Witzel, "there must have been a long period of acculturation between the local population and the 'original' immigrants speaking Indo-Aryan." Witzel also notes that the speakers of Indo-Aryan and the local population must have been bilingual, speaking each other's languages and interacting with each other, before the Rg Veda was composed in the Punjab. === Salmons: systematic changes in community structure === Joseph Salmons notes that Anthony presents scarce concrete evidence or arguments. Salmons is critical about the notion of "prestige" as a central factor in the shift to Indo-European languages, referring to Milroy who notes that "prestige" is "a cover term for a variety of very distinct notions". Instead, Milroy offers "arguments built around network structure", though Salmons also notes that Anthony includes several of those arguments, "including political and technological advantages". According to Salmons, the best model is offered by Fishman, who<blockquote>... understands shift in terms of geographical, social, and cultural "dislocation" of language communities. Social dislocation, to give the most relevant example, involves "siphoning off the talented, the enterprising, the imaginative and the creative" ([Fishman] 1991: 61), and sounds strikingly like Anthony's 'recruitment' scenario.</blockquote>Salmons himself argues that<blockquote>... systematic changes in community structure are what drive language shift, incorporating Milroy's network structures as well. The heart of the view is the quintessential element of modernization, namely a shift from local community-internal organization to regional (state or national or international, in modern settings), extra-community organizations. Shift correlates with this move from pre-dominantly "horizontal" community structures to more "vertical" ones.</blockquote> == Genetics: ancient ancestry and multiple gene flows == See also: Genetics and archaeogenetics of South Asia and Peopling of India India has one of the most genetically diverse populations in the world, and the history of this genetic diversity is the topic of continued research and debate. The Indo-Aryan migrations form part of a complex genetical puzzle on the origin and spread of the various components of the Indian population, including various waves of admixture and language shift. The genetic impact of the Indo-Aryans may have been marginal, but this is not at odds with the cultural and linguistic influence, since language shift is possible without a change in genetics. === Ancestral groups === ==== Common maternal ancestry ==== Sahoo et al. (2006) states that "there is general agreement<sup>[''clarification needed'']</sup> that Indian caste and tribal populations share a common late Pleistocene maternal ancestry in India." Kivisild et al. (1999) concluded that there is "an extensive deep late Pleistocene<sup>[''jargon'']</sup> genetic link between contemporary Europeans and Indians" via the mitochondrial DNA, that is, DNA which is inherited from the mother. According to them, the two groups split at the time of the peopling of Asia and Eurasia and before modern humans entered Europe. Kivisild et al. (2000) note that "the sum of any recent (the last 15,000 years) western mtDNA gene flow to India comprises, in average, less than 10 percent of the contemporary Indian mtDNA lineages." Kivisild et al. (2003) and Sharma et al. (2005) note that north and south Indians share a common maternal ancestry: Kivisild et al. (2003) further note that "these results show that Indian tribal and caste populations derive largely from the same genetic heritage of Pleistocene<sup>[''jargon'']</sup> southern and western Asians and have received limited gene flow from external regions since the Holocene.<sup>[''jargon'']</sup> ==== "Ancestral North Indians" and "Ancestral South Indians" ==== Reich et al. (2009), in a collaborative effort between the Harvard Medical School and the Centre for Cellular and Molecular Biology (CCMB), examined the entire genomes worth 560,000 single nucleotide polymorphisms (SNPs), as compared to 420 SNPs in prior work. They also cross-compared them with the genomes of other regions available in the global genome database. Through this study, they were able to discern two genetic groups in the majority of populations in India, which they called "Ancestral North Indians" (ANI) and "Ancestral South Indians" (ASI). They found that the ANI genes are close to those of Middle Easterners, Central Asians and Europeans whereas the ASI genes are dissimilar to all other known populations outside India, though the indigenous Andamanese were determined to be the most closely related to the ASI population of any living group (albeit distinct from the ASI). These two distinct groups, which had split ca. 50,000 years ago, formed the basis for the present population of India. The two groups mixed between 1,900 and 4,200 years ago (2200 BCE – 100 CE), where-after a shift to endogamy took place and admixture became rare. Speaking to Fountain Ink, David Reich stated, "Prior to 4,200 years ago, there were unmixed groups in India. Sometime between 1,900 to 4,200 years ago, profound, pervasive convulsive mixture occurred, affecting every Indo-European and Dravidian group in India without exception." Reich pointed out that their work does not show that a substantial migration occurred during this time. Metspalu et al. (2011), representing a collaboration between the Estonian Biocenter and CCMB, confirmed that the Indian populations are characterized by two major ancestry components. One of them is spread at comparable frequency and haplotype diversity in populations of South and West Asia and the Caucasus. The second component is more restricted to South Asia and accounts for more than 50% of the ancestry in Indian populations. Haplotype diversity associated with these South Asian ancestry components is significantly higher than that of the components dominating the West Eurasian ancestry palette. Segurel et al. (2020) notes the -13910*T Lactase persistence mutation, found in present-day South Asia, first appeared approximately 3,960 BCE, in Ukraine, and spread between 2,000 and 1,500 BCE throughout Eurasia. Earlier Tandon et al. (1981) had studied the distribution of lactase toleration in North and South Indians. Romero et al.(2011) later plotting a decreasing North West to South East Indian cline for the mutations frequency . ==== Additional components ==== ArunKumar et al. (2015) discern three major ancestry components, which they call "Southwest Asian", "Southeast Asian" and "Northeast Asian". The Southwest Asian component seems to be a native Indian component, while the Southeast Asian component is related to East Asian populations. Brahmin<sup>[''needs context'']</sup> populations "contained 11.4 and 10.6% of Northern Eurasian and Mediterranean components, thereby suggesting a shared ancestry with the Europeans". They note that this fits with earlier studies which "suggested similar shared ancestries with Europeans and Mediterraneans". They further note that<blockquote>Studies based on uni-parental marker have shown diverse Y-chromosomal haplogroups making up the Indian gene pool. Many of these Y-chromosomal markers show a strong correlation to the linguistic affiliation of the population. The genome-wide variation of the Indian samples in the present study correlated with the linguistic affiliation of the sample.</blockquote>They conclude that, while there may have been an ancient settlement in the subcontinent, "male-dominated genetic elements shap[ed] the Indian gene pool", and that these elements "have earlier been correlated to various languages", and further note "the fluidity of female gene pools when in a patriarchal and patrilocal society, such as that of India". Basu et al. (2016) extend the study of Reich et al. (2009) by postulating two other populations in addition to the ANI and ASI: "Ancestral Austro-Asiatic" (AAA) and "Ancestral Tibeto-Burman" (ATB), corresponding to the Austroasiatic and Tibeto-Burman language speakers. According to them, ancestral populations seem to have occupied geographically separated habitats. The ASI and the AAA were early<sup>[''when?'']</sup> settlers, who possibly arrived via the southern wave out of Africa. The ANI are related to Central South Asians and entered India through the northwest, while the ATB are related to East Asians and entered India through northeast corridors. They further note that<blockquote>The asymmetry of admixture, with ANI populations providing genomic inputs to tribal populations (AA, Dravidian tribe, and TB) but not vice versa, is consistent with elite dominance and patriarchy. Males from dominant populations, possibly upper castes, with high ANI component, mated outside of their caste, but their offspring were not allowed to be inducted into the caste. This phenomenon has been previously observed as asymmetry in homogeneity of mtDNA and heterogeneity of Y-chromosomal haplotypes in tribal populations of India as well as the African Americans in United States.</blockquote> ==== Male-mediated migration ==== Reich et al. (2009), citing Kivisild et al. (1999), indicate that there has been a low influx of female genetic material since 50,000 years ago, but a "male gene flow from groups with more ANI relatedness into ones with less". ArunKumar et al. (2015) "suggest that ancient male-mediated migratory events and settlement in various regional niches led to the present day scenario and peopling of India." Mahl (2021), in a study of the Brahmin ethnic group, identified the ancient male protagonists of the sampled population could be traced to twelve geographic locations, eleven of which were outside South Asia. Of the Y-DNA haplogroups identified, four were carried by ~83% of those sampled, and of these four, two were of Central Asian origin and one of the Fertile Crescent. All sampled groups were admixed with populations of South Asian origin. === North-south cline === According to Metspalu et al. (2011) there is "a general principal component cline stretching from Europe to south India". This northwest component is shared with populations from the Middle East, Europe and Central Asia, and is thought to represent at least one ancient influx of people from the northwest.<sup>[''clarification needed'']</sup> According to Saraswathy et al. (2010), there is "a major genetic contribution from Eurasia to North Indian upper castes" and a "greater genetic inflow among North Indian caste populations than is observed among South Indian caste and tribal populations". According to Basu et al. (2003) and Saraswathy et al. (2010) certain sample populations of upper caste North Indians show a stronger affinity to Central Asian caucasians, whereas southern Indian Brahmins show a less stronger affinity. === Scenarios === While Reich notes that the onset of admixture coincides with the arrival of Indo-European language, according to Metspalu (2011), the commonalities of the ANI with European genes cannot be explained by the influx of Indo-Aryans at ca. 3,500 BP alone. They state that the split of ASI and ANI predates the Indo-Aryan migration, both of these ancestry components being older than 3,500 BP." Moorjani (2013) states that "We have further shown that groups with unmixed ANI and ASI ancestry were plausibly living in India until this time." Moorjani (2013) describes three scenarios regarding the bringing together of the two groups: # "migrations that occurred prior to the development of agriculture [8,000–9,000 years before present (BP)]. Evidence for this comes from mitochondrial DNA studies, which have shown that the mitochondrial haplogroups (hg U2, U7, and W) that are most closely shared between Indians and West Eurasians diverged about 30,000–40,000 years BP." # "Western Asian peoples migrated to India along with the spread of agriculture [...] Any such agriculture related migrations would probably have begun at least 8,000–9,000 years BP (based on the dates for Mehrgarh) and may have continued into the period of the Indus civilization that began around 4,600 years BP and depended upon West Asian crops." # "migrations from Western or Central Asia from 3,000 to 4,000 years BP, a time during which it is likely that Indo-European languages began to be spoken in the subcontinent. A difficulty with this theory, however, is that by this time India was a densely populated region with widespread agriculture, so the number of migrants of West Eurasian ancestry must have been extraordinarily large to explain the fact that today about half the ancestry in India derives from the ANI." ==== Pre-agricultural migrations ==== See also: Peopling of India Metspalu et al. (2011) detected a genetic component in India, k5, which "distributed across the Indus Valley, Central Asia, and the Caucasus". According to Metspalu et al. (2011), k5 "might represent the genetic vestige of the ANI", though they also note that the geographic cline of this component within India "is very weak, which is unexpected under the ASI-ANI model", explaining that the ASI-ANI model implies an ANI contribution which decreases toward southern India. According to Metspalu et al. (2011), "regardless of where this component was from (the Caucasus, Near East, Indus Valley, or Central Asia), its spread to other regions must have occurred well before our detection limits at 12,500 years." Speaking to Fountain Ink, Metspalu said, "the West Eurasian component in Indians appears to come from a population that diverged genetically from people actually living in Eurasia, and this separation happened at least 12,500 years ago." Moorjani et al. (2013) refer to Metspalu (2011) as "fail[ing] to find any evidence for shared ancestry between the ANI and groups in West Eurasia within the past 12,500 years". CCMB researcher Thangaraj believes that "it was much longer ago", and that "the ANI came to India in a second wave of migration that happened perhaps 40,000 years ago." Narasimhan et al. (2019) conclude that ANI and ASI were formed in the 2nd millennium BCE. They were preceded by IVC-people, a mixture of AASI (ancient ancestral south Indians, that is, hunter-gatherers related), and people related to but distinct from Iranian agri-culturalists, lacking the Anatolian farmer-related ancestry which was common in Iranian farmers after 6000 BCE. Those Iranian farmers-related people may have arrived in India before the advent of farming in northern India, and mixed with people related to Indian hunter-gatherers ca. 5400 to 3700 BCE, before the advent of the mature IVC. This mixed IVC-population, which probably was native to the Indus Valley Civilisation, "contributed in large proportions to both the ANI and ASI", which took shape during the 2nd millennium BCE. ANI formed out of a mixture of "''Indus_Periphery''-related groups" and migrants from the steppe, while ASI was formed out of "''Indus_Periphery''-related groups" who moved south and mixed with hunter-gatherers. ==== Agricultural migrations ==== ===== Near-Eastern migrations ===== See also: Neolithic Revolution, Fertile Crescent, and Dravidian languages § Prehistory Kivisild et al. (1999) note that "a small fraction of the 'Caucasoid-specific' mtDNA lineages found in Indian populations can be ascribed to a relatively recent admixture." at ca. 9,300 ± 3,000 years before present, which coincides with "the arrival to India of cereals domesticated in the fertile Crescent" and "lends credence to the suggested linguistic connection between Elamite and Dravidic populations". According to Gallego Romero et al. (2011), their research on lactose tolerance in India suggests that "the west Eurasian genetic contribution identified by Reich et al. (2009) principally reflects gene flow from Iran and the Middle East." Gallego Romero notes that Indians who are lactose-tolerant show a genetic pattern regarding this tolerance which is "characteristic of the common European mutation". According to Gallego Romero, this suggests that "the most common lactose tolerance mutation made a two-way migration out of the Middle East less than 10,000 years ago. While the mutation spread across Europe, another explorer must have brought the mutation eastward to India – likely traveling along the coast of the Persian Gulf where other pockets of the same mutation have been found." In contrast, Allentoft et al. (2015) found that lactose-tolerance was absent in the Yamnaya culture, noting that while "the Yamnaya and these other Bronze Age cultures herded cattle, goats, and sheep, they couldn't digest raw milk as adults. Lactose tolerance was still rare among Europeans and Asians at the end of the Bronze Age, just 2000 years ago." According to Lazaridis et al. (2016), "farmers related to those from Iran spread northward into the Eurasian steppe; and people related to both the early farmers of Iran and to the pastoralists of the Eurasian steppe spread eastward into South Asia." They further note that ANI "can be modelled as a mix of ancestry related to both early farmers of western Iran and to people of the Bronze Age Eurasian steppe". ===== Haplogroup R1a and related haplogroups ===== Main article: Haplogroup R1a The distribution and proposed origin of haplogroup R1a, more specifically R1a1a1b, is often being used as an argument pro or contra the Indo-Aryan migrations. It is found in high frequencies in Eastern Europe (Z282) and south Asia (Z93), the areas of the Indo-European migrations. The place of origin of this haplogroup may give an indication of the "homeland" of the Indo-Europeans, and the direction of the first migrations. Cordeaux et al. (2004), based on the spread of a cluster of haplogroups (J2, R1a, R2, and L) in India, with higher rates in northern India, argue that agriculture in south India spread with migrating agriculturalists, which also influenced the genepool in south India. Sahoo et al. (2006), in response to Cordeaux et al. (2004), suggest that those haplogroups originated in India, based on the spread of these various haplogroups in India. According to Sahoo et al. (2006), this spread "argue[s] against any major influx, from regions north and west of India, of people associated either with the development of agriculture or the spread of the Indo-Aryan language family". They further propose that "the high incidence of R1* and R1a throughout Central Asian and East European populations (without R2 and R* in most cases) is more parsimoniously explained by gene flow in the opposite direction", which according to Sahoo et al. (2006) explains the "sharing of some Y-chromosomal haplogroups between Indian and Central Asian populations". Sengupta et al. (2006) also comment on Cordeaux et al. (2004), stating that "the influence of Central Asia on the pre-existing gene pool was minor", and arguing for "a peninsular origin of Dravidian speakers than a source with proximity to the Indus and with significant genetic input resulting from demic diffusion associated with agriculture". Sharma et al. (2009) found a high frequency of R1a1 in India. They therefore argue for an Indian origin of R1a1, and dispute "the origin of Indian higher most castes from Central Asian and Eurasian regions, supporting their origin within the Indian subcontinent". Underhill et al. (2014/2015) conclude that R1a1a1, the most frequent subclade of R1a, split into Z282 (Europe) and Z93 (Asia) at circe 5,800 before present. According to Underhill et al. (2014/2015), "[t]his suggests the possibility that R1a lineages accompanied demic expansions initiated during the Copper, Bronze, and Iron ages." They further note that the diversification of Z93 and the "early urbanization within the Indus Valley also occurred at this time and the geographic distribution of R1a-M780 (Figure 3d) may reflect this". Palanichamy et al. (2015), while responding to Cordeaux et al. (2004), Sahoo et al. (2006) and Sengupta et al. (2006), elaborated on Kivisild et al.'s (1999) suggestion that West Eurasian haplogroups "may have been spread by the early Neolithic migrations of proto-Dravidian farmers spreading from the eastern horn of the Fertile Crescent into India". They conclude that "the L1a lineage arrived from western Asia during the Neolithic period and perhaps was associated with the spread of the Dravidian language to India", indicating that "the Dravidian language originated outside India and may have been introduced by pastoralists coming from western Asia (Iran)." They further conclude that two subhalogroups originated with the Dravidian speaking peoples, and may have come to South India when the Dravidian language spread. Poznik et al. (2016) note that "striking expansions" occurred within R1a-Z93 at ~4,500–4,000 years ago, which "predates by a few centuries the collapse of the Indus Valley Civilisation". Mascarenhas et al. (2015) note that the expansion of Z93 from Transcaucasia into South Asia is compatible with "the archeological records of eastward expansion of West Asian populations in the 4th millennium BCE culminating in the so-called Kura-Araxes migrations in the post-Uruk IV period". ==== Indo-European migrations ==== ===== Genetic impact of Indo-Aryan migrations ===== Bamshad et al. (2001), Wells et al. (2002) and Basu et al. (2003) argue for an influx of Indo-European migrants into the Indian subcontinent, but not necessarily an "invasion of any kind". Bamshad et al. (2001) notice that the correlation between caste-status and West Eurasian DNA may be explained by subsequent male immigration into the Indian subcontinent. Basu et al. (2003) argue that the Indian subcontinent was subjected to a series of Indo-European migrations about 1500 BCE. Metspalu et al. (2011) note that "any nonmarginal migration from Central Asia to South Asia should have also introduced readily apparent signals of East Asian ancestry into India" (although this presupposes the unproven assumption that East Asian ancestry was present – to a significant extent – in prehistorical Central Asia), which is not the case, and conclude that if there was a major migration of Eurasians into India, this happened before the rise of the Yamna culture. Based on Metspalu (2011), Lalji Singh, a co-author of Metspalu, concludes that "[t]here is no genetic evidence that Indo-Aryans invaded or migrated to India". Moorjani et al. (2013) notes that the period of 4,200–1,900 years BP was a time of dramatic changes in northern India, and coincides with the "likely first appearance of Indo-European languages and Vedic religion in the subcontinent". Moorjani further notes that there must have been multiple waves of admixture, which had more impact on higher-caste and northern Indians and took place more recently. This may be explained by "additional gene flow", related to the spread of languages:<blockquote>...at least some of the history of population mixture in India is related to the spread of languages in the subcontinent. One possible explanation for the generally younger dates in northern Indians is that after an original mixture event of ANI and ASI that contributed to all present-day Indians, some northern groups received additional gene flow from groups with high proportions of West Eurasian ancestry, bringing down their average mixture date.</blockquote>Palanichamy et al. (2015), elaborating on Kivisild et al. (1999) conclude that "A large proportion of the west Eurasian mtDNA haplogroups observed among the higher-ranked caste groups, their phylogenetic affinity and age estimate indicate recent Indo-Aryan migration to India from west Asia. According to Palanichamy et al. (2015), "the west Eurasian admixture was restricted to caste rank. It is likely that Indo-Aryan migration has influenced the social stratification in the pre-existing populations and helped in building the Hindu caste system, but it should not be inferred that the contemporary Indian caste groups have directly descended from Indo-Aryan immigrants. Jones et al. (2015) state that Caucasus hunter gatherer(CHG) was "a major contributor to the Ancestral North Indian component". According to Jones et al. (2015), it "may be linked with the spread of Indo-European languages", but they also note that "earlier movements associated with other developments such as that of cereal farming and herding are also plausible". Basu et al. (2016) note that the ANI are inseparable from Central-South Asian populations in present-day Pakistan. They hypothesise that "the root of ANI is in Central Asia". According to Lazaridis et al. (2016) ANI "can be modelled as a mix of ancestry related to both early farmers of western Iran and to people of the Bronze Age Eurasian steppe". Silva et al. (2017) state that "the recently refined Y-chromosome tree strongly suggests that R1a is indeed a highly plausible marker for the long-contested Bronze Age spread of Indo-Aryan speakers into South Asia." Silva et al. (2017) further notes "they likely spread from a single Central Asian source pool, there do seem to be at least three and probably more R1a founder clades within the Subcontinent, consistent with multiple waves of arrival." Narasimhan et al. (2018) conclude that pastoralists spread southwards from the Eurasian steppe during the period 2300–1500 BCE. These pastoralists during the 2nd millennium BCE, who were likely associated with Indo-European languages, presumably mixed with the descendants of the Indus Valley Civilisation, who in turn were a mix of Iranian agriculturalists and South Asian hunter-gatherers forming "the single most important source of ancestry in South Asia." Zerjal et al. (2002) argue that "multiple recent events" may have reshaped India's genetic landscape. ==== Origins of R1a-Z93 ==== Ornella Semino et al. (2000) proposed Ukrainian origins of R1a1, and a postglacial spread of the R1a1 gene during the Late Glacial, subsequently magnified by the expansion of the Kurgan culture into Europe and eastward. Spencer Wells proposes central Asian origins, suggesting that the distribution and age of R1a1 points to an ancient migration corresponding to the spread by the Kurgan people in their expansion from the Eurasian Steppe. According to Pamjav et al. (2012), "Inner and Central Asia is an overlap zone for the R1a1-Z280 and R1a1-Z93 lineages [which] implies that an early differentiation zone of R1a1-M198 conceivably occurred somewhere within the Eurasian Steppes or the Middle East and Caucasus region as they lie between South Asia and Eastern Europe." A 2014 study by Peter A. Underhill et al., using 16,244 individuals from over 126 populations from across Eurasia, concluded that there was compelling evidence that "the initial episodes of haplogroup R1a diversification likely occurred in the vicinity of present-day Iran." According to Martin P. Richards, co-author of Silva et al. (2017), "[the prevalence of R1a in India was] very powerful evidence for a substantial Bronze Age migration from central Asia that most likely brought Indo-European speakers to India." == Literary research: similarities, geography, and references to migration == === Similarities === ==== Mitanni ==== See also: Indo-Aryan superstrate in Mitanni The oldest inscriptions in Old Indic, the language of the Rig Veda, is found not in India, but in northern Syria in Hittite records regarding one of their neighbors, the Hurrian-speaking Mitanni. In a treaty with the Hittites, the king of Mitanni, after swearing by a series of Hurrian gods, swears by the gods Mitrašil, Uruvanaššil, Indara, and Našatianna, who correspond to the Vedic gods Mitra, Varuna, Indra, and Nāsatya (Aśvin). Contemporary<sup>[''when?'']</sup> equestrian terminology, as recorded in a horse-training manual whose author is identified as "Kikkuli", contains Indo-Aryan loanwords. The personal names and gods of the Mitanni aristocracy also bear significant traces of Indo-Aryan. Because of the association of Indo-Aryan with horsemanship and the Mitanni aristocracy, it is presumed that, after superimposing themselves as rulers on a native Hurrian-speaking population about the 15th–16th centuries BCE, Indo-Aryan charioteers were absorbed into the local population and adopted the Hurrian language. Brentjes argues that there is not a single cultural element of central Asian, Eastern European, or Caucasian origin in the Mitannian area; he also associates with an Indo-Aryan presence the peacock motif found in the Middle East from before 1600 BCE and quite likely from before 2100 BCE. Scholars reject the possibility that the Indo-Aryans of Mitanni came from the Indian subcontinent as well as the possibility that the Indo-Aryans of the Indian subcontinent came from the territory of Mitanni, leaving migration from the north the only likely scenario. The presence of some Bactria-Margiana loan words in Mitanni, Old Iranian and Vedic further strengthens this scenario. ==== Iranian Avesta ==== The religious practices depicted in the ''Rigveda'' and those depicted in the ''Avesta'', the central religious text of Zoroastrianism—the ancient Iranian faith founded by the prophet Zoroaster—have in common the deity Mitra, priests called ''hotṛ'' in the ''Rigveda'' and ''zaotar'' in the ''Avesta'', and the use of a ritual substance that the ''Rigveda'' calls ''soma'' and the ''Avesta'' ''haoma''. However, the Indo-Aryan ''deva'' 'god' is cognate with the Iranian ''daēva'' 'demon'. Similarly, the Indo-Aryan ''asura'' 'name of a particular group of gods' (later on, 'demon') is cognate with the Iranian ''ahura'' 'lord, god,' which 19th and early 20th century authors such as Burrow explained as a reflection of religious rivalry between Indo-Aryans and Iranians. Linguists such as Burrow argue that the strong similarity between the Avestan of the ''Gāthās''—the oldest part of the ''Avesta''—and the Vedic Sanskrit of the ''Rigveda'' pushes the dating of Zarathustra or at least the ''Gathas'' closer to the conventional ''Rigveda'' dating of 1500–1200 BCE, i.e. 1100 BCE, possibly earlier. Boyce concurs with a lower date of 1100 BCE and tentatively proposes an upper date of 1500 BCE. Gnoli dates the ''Gathas'' to around 1000 BCE, as does Mallory (1989), with the caveat of a 400-year leeway on either side, i.e. between 1400 and 600 BCE. Therefore, the date of the Avesta could also indicate the date of the Rigveda. There is mention in the ''Avesta'' of ''Airyan Vaejah'', one of the '16 the lands of the Aryans'. Gnoli's interpretation of geographic references in the ''Avesta'' situates the ''Airyanem Vaejah'' in the Hindu Kush. For similar reasons, Boyce excludes places north of the Syr Darya and western Iranian places. With some reservations, Skjaervo concurs that the evidence of the Avestan texts makes it impossible to avoid the conclusion that they were composed somewhere in northeastern Iran. Witzel points to the central Afghan highlands. Humbach derives Vaējah from cognates of the Vedic root "vij", suggesting the region of fast-flowing rivers. Gnoli considers Choresmia (Xvairizem), the lower Oxus region, south of the Aral Sea to be an outlying area in the Avestan world. However, according to Mallory & Mair (2000), the probable homeland of Avestan is, in fact, the area south of the Aral Sea. === Geographical location of Rigvedic rivers === Main articles: Sarasvati River and Samudra The geography of the Rigveda seems to be centered on the land of the seven rivers. While the geography of the Rigvedic rivers is unclear in some of the early books of the Rigveda, the Nadistuti sukta is an important source for the geography of late Rigvedic society. The Sarasvati River is one of the chief Rigvedic rivers. The Nadistuti sukta in the Rigveda mentions the Sarasvati between the Yamuna in the east and the Sutlej in the west, and later texts like the Brahmanas and Mahabharata mention that the Sarasvati dried up in a desert. Scholars agree that at least some of the references to the Sarasvati in the Rigveda refer to the Ghaggar-Hakra River, while the Afghan river Haraxvaiti/Harauvati Helmand is sometimes quoted as the locus of the early Rigvedic river. Whether such a transfer of the name has taken place from the Helmand to the Ghaggar-Hakra is a matter of dispute. Identification of the early Rigvedic Sarasvati with the Ghaggar-Hakra before its assumed drying up early in the second millennium would place the Rigveda BCE, well outside the range commonly assumed by Indo-Aryan migration theory. A non-Indo-Aryan substratum in the river-names and place-names of the Rigvedic homeland would support an external origin of the Indo-Aryans.<sup>[''citation needed'']</sup> However, most place-names in the Rigveda and the vast majority of the river-names in the north-west of the Indian subcontinent are Indo-Aryan. Non-Indo-Aryan names are, however, frequent in the Ghaggar and Kabul River areas, the first being a post-Harappan stronghold of Indus populations.<sup>[''citation needed'']</sup> === Textual references to migrations === ==== Rigveda ==== Just as the Avesta does not mention an external homeland of the Zoroastrians, the Rigveda does not explicitly refer to an external homeland or to a migration. Later Hindu texts, such as the Brahmanas, Mahabharata, Ramayana, and Puranas, are centered in the Ganges region (rather than Haryana and Punjab) and mention regions still further to the south and east, suggesting a later movement or expansion of the Vedic religion and culture to the east. There is no clear indication of general movement in either direction in the Rigveda itself; searching for indirect references in the text, or by correlating geographic references with the proposed order of composition of its hymns, has not led to any consensus on the issue.<sup>[''citation needed'']</sup> ==== Srauta Sutra of Baudhayana ==== According to Romila Thapar, the ''Srauta Sutra of Baudhayana'' "refers to the Parasus and the arattas who stayed behind and others who moved eastwards to the middle Ganges valley and the places equivalent such as the Kasi, the Videhas and the Kuru Pancalas, and so on. In fact, when one looks for them, there are evidence for migration." ==== Later Vedic and Hindu texts ==== Texts like the Puranas and Mahabharata belong to a much later period than the Rigveda, making their evidence less than sufficient to be used for or against the Indo-Aryan migration theory.<sup>[''original research?'']</sup> Later Vedic texts show a shift<sup>[''citation needed'']</sup> of location from the Punjab to the East. According to the Yajurveda, Yajnavalkya (a Vedic ritualist and philosopher) lived in the eastern region of Mithila. Aitareya Brahmana 33.6.1. records that Vishvamitra's sons migrated to the north, and in Shatapatha Brahmana 1:2:4:10 the Asuras were driven to the north. In much later texts, Manu was said to be a king from Dravida. In the legend of the flood he stranded with his ship in Northwestern India or the Himalayas. The Vedic lands (e.g. Aryavarta, Brahmavarta) are located in Northern India or at the Sarasvati and Drishadvati river. However, in a post-Vedic text the Mahabharata Udyoga Parva (108), the East is described as the homeland of the Vedic culture, where "the divine Creator of the universe first sang the Vedas". The legends of Ikshvaku, Sumati and other Hindu legends may have their origin in Southeast Asia. The Puranas record that Yayati left Prayag (confluence of the Ganges & Yamuna) and conquered the region of Sapta Sindhu. His five sons Yadu, Druhyus, Puru, Anu and Turvashu correspond to the main tribes of the Rigveda. The Puranas also record that the Druhyus were driven out of the land of the seven rivers by Mandhatr and that their next king Gandhara settled in a north-western region which became known as Gandhara. The sons of the later Druhyu king Prachetas are supposed by some to have 'migrated' to the region north of Afghanistan though the Puranic texts only speak of an "adjacent" settlement. == Ecology == See also: Bond event, 5.9 kiloyear event, and 4.2-kiloyear event Climate change and drought may have triggered both the initial dispersal of Indo-European speakers, and the migration of Indo-Europeans from the steppes in south-central Asia and India. Around 4200–4100 BCE a climate change occurred, manifesting in colder winters in Europe. Between 4200 and 3900 BCE many tell settlements in the lower Danube Valley were burned and abandoned, while the Cucuteni-Tripolye culture showed an increase in fortifications, meanwhile moving eastwards towards the Dniepr. Steppe herders, archaic Proto-Indo-European speakers, spread into the lower Danube valley about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. The Yamna horizon was an adaptation to a climate change which occurred between 3500 and 3000 BCE, in which the steppes became drier and cooler. Herds needed to be moved frequently to feed them sufficiently, and the use of wagons and horse-back riding made this possible, leading to "a new, more mobile form of pastoralism". It was accompanied by new social rules and institutions, to regulate the local migrations in the steppes, creating a new social awareness of a distinct culture, and of "cultural Others" who did not participate in these new institutions. In the second century BCE widespread aridization led to water shortages and ecological changes in both the Eurasian steppes and south Asia. At the steppes, humidization led to a change of vegetation, triggering "higher mobility and transition to the nomadic cattle breeding". Water shortage also had a strong impact in south Asia:<blockquote>This time was one of great upheaval for ecological reasons. Prolonged failure of rains caused acute water shortage in a large area, causing the collapse of sedentary urban cultures in south-central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations. Inevitably, the new arrivals came to merge with and dominate the post-urban cultures.</blockquote>The Indus Valley civilisation was localised, that is, urban centers disappeared and were replaced by local cultures, due to a climatic change that is also signalled for the neighbouring areas of the Middle East. As of 2016 many scholars believe that drought and a decline in trade with Egypt and Mesopotamia caused the collapse of the Indus Civilisation. The Ghaggar-Hakra system was rain-fed, and water-supply depended on the monsoons. The Indus valley climate grew significantly cooler and drier from about 1800 BCE, linked to a general weakening of the monsoon at that time. The Indian monsoon declined and aridity increased, with the Ghaggar-Hakra retracting its reach towards the foothills of the Himalaya, leading to erratic and less extensive floods that made inundation agriculture less sustainable. Aridification reduced the water supply enough to cause the civilisation's demise, and to scatter its population eastward. == Indigenous Aryanism == Main article: Indigenous Aryanism Indian nationalistic opponents of the Indo-Aryan migration question it, and instead promote Indigenous Aryanism, claiming that speakers of Indo-Iranian languages (sometimes called ''Aryan languages'') are "indigenous" to the Indian subcontinent. Indigenous Aryanism has no support in contemporary mainstream scholarship, as it is contradicted by a broad range of research on Indo-European migrations. 46e8d3e5a66703b5d21be2863765a9566d93dba0 1364 1359 2024-03-18T09:11:22Z Motzoid India 2 wikitext text/x-wiki The '''Indo-Aryan migrations''' were the migrations into the Indian subcontinent of Indo-Aryan peoples, an ethnolinguistic group that spoke Indo-Aryan languages. These are the predominant languages of today's Bangladesh, Maldives, Nepal, North India, Eastern Pakistan, and Sri Lanka. Indo-Aryan migration into the region, from Central Asia, are considered to have started after 2000 BCE as a slow diffusion during the Late Harappan period and led to a language shift in the northern Indian subcontinent. Several hundred years later, the Iranian languages were brought into the Iranian plateau by the Iranians, who were closely related to the Indo-Aryans. The Proto-Indo-Iranian culture, which gave rise to the Indo-Aryans and Iranians, developed on the Central Asian steppes north of the Caspian Sea as the Sintashta culture (c. 2200-1900 BCE), in present-day Russia and Kazakhstan, and developed further as the Andronovo culture (2000–1450 BCE). The Indo-Aryans split off sometime between 2000 BCE and 1600 BCE from the Indo-Iranians, and migrated southwards to the Bactria–Margiana culture (BMAC), from which they borrowed some of their distinctive religious beliefs and practices. From the BMAC, the Indo-Aryans migrated into northern Syria and, possibly in multiple waves, into the Punjab (northern Pakistan and India), while the Iranians could have reached western Iran before 1300 BCE, both bringing with them the Indo-Iranian languages. Migration by an Indo-European-speaking people was first hypothesized in the late 18th century, following the discovery of the Indo-European language family, when similarities between western and Indian languages had been noted. Given these similarities, a single source or origin was proposed, which was diffused by migrations from some original homeland. This linguistic argument of this theory is supported by archaeological, anthropological, genetic, literary and ecological research. Genetic research reveals that those migrations form part of a complex genetic puzzle on the origin and spread of the various components of the Indian population. Literary research reveals similarities between various, geographically distinct, Indo-Aryan historical cultures. Ecological studies reveal that in the second millennium BCE widespread aridization led to water shortages and ecological changes in both the Eurasian steppes and the Indian subcontinent, causing the collapse of sedentary urban cultures in south central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations, resulting in the merger of migrating peoples with the post-urban cultures. The Indo-Aryan migrations started sometime in the period from approximately 2000 to 1600 BCE, after the invention of the war chariot, and also brought Indo-Aryan languages into the Levant and possibly Inner Asia. It was part of the diffusion of Indo-European languages from the proto-Indo-European homeland at the Pontic–Caspian steppe, a large area of grasslands in far Eastern Europe, which started in the 5th to 4th millennia BCE, and the Indo-European migrations out of the Eurasian Steppes, which started approximately in 2000 BCE. These Indo-Aryan speaking people were united by shared cultural norms and language, referred to as ''ārya'', "noble". Diffusion of this culture and language took place by patron-client systems, which allowed for the absorption and acculturation of other groups into this culture, and explains the strong influence on other cultures with which it interacted. == Fundamentals == The Indo-Aryan migration theory is part of a larger theoretical framework. This framework explains the similarities between a wide range of contemporary and ancient languages. It combines linguistic, archaeological and anthropological research. This provides an overview of the development of Indo-European languages, and the spread of these Indo-European languages by migration and acculturation. === Linguistics: relationships between languages === The linguistic part traces the connections between the various Indo-European languages, and reconstructs the proto-Indo-European language. This is possible because the processes that change languages are not random, but follow strict patterns. Sound shifts, the changing of vowels and consonants, are especially important, although grammar (especially morphology) and the lexicon (vocabulary) may also be significant. Historical-comparative linguistics thus makes it possible to see great similarities between related languages which at first sight might seem very different. Various characteristics of the Indo-European languages argue against an Indian origin of these languages, and point to a steppe origin. === Archaeology: migrations from the steppe Urheimat === The archaeological part posits an "Urheimat" on the Pontic steppes, which developed after the introduction of cattle on the steppes around 5,200 BCE. This introduction marked the change from foragist to pastoralist cultures, and the development of a hierarchical social system with chieftains, patron-client systems, and the exchange of goods and gifts. The oldest nucleus may have been the Samara culture (late 6th and early 5th millennium BCE), at a bend in the Volga. A wider "horizon" developed, called the Kurgan culture by Marija Gimbutas in the 1950s. She included several cultures in this "Kurgan Culture", including the Samara culture and the Yamna culture, although the Yamna culture (36th–23rd centuries BCE), also called "Pit Grave Culture", may more aptly be called the "nucleus" of the proto-Indo-European language. From this area, which already included various subcultures, Indo-European languages spread west, south and east starting around 4,000 BCE. These languages may have been carried by small groups of males, with patron-client systems which allowed for the inclusion of other groups into their cultural system. Eastward emerged the Sintashta culture (2200–1900 BCE), where common Indo-Iranian was spoken. Out of the Sintashta culture developed the Andronovo culture (2000–1450 BCE), which interacted with the Bactria-Margiana culture (2250–1700 BCE). This interaction further shaped the Indo-Iranians, which split at sometime between 2000 and 1600 BCE into the Indo-Aryans and the Iranians. The Indo-Aryans migrated to the Levant and South Asia. The migration into northern India was not a large-scale immigration, but may have consisted of small groups which were genetically diverse.<sup>[''clarification needed'']</sup> Their culture and language spread by the same mechanisms of acculturalisation, and the absorption of other groups into their patron-client system. === Anthropology: elite recruitment and language shift === See also: Language shift Indo-European languages probably spread through language shifts. Small groups can change a larger cultural area, and elite male dominance by small groups may have led to a language shift in northern India. David Anthony, in his "revised Steppe hypothesis" notes that the spread of the Indo-European languages probably did not happen through "chain-type folk migrations", but by the introduction of these languages by ritual and political elites, which were emulated by large groups of people, a process which he calls "elite recruitment". According to Parpola, local elites joined "small but powerful groups" of Indo-European speaking migrants. These migrants had an attractive social system and good weapons, and luxury goods which marked their status and power. Joining these groups was attractive for local leaders, since it strengthened their position, and gave them additional advantages. These new members were further incorporated by matrimonial alliances. According to Joseph Salmons, language shift is facilitated by "dislocation" of language communities, in which the elite is taken over. According to Salmons, this change is facilitated by "systematic changes in community structure", in which a local community becomes incorporated in a larger social structure. === Genetics: ancient ancestry and multiple gene flows === See also: Genetics and archaeogenetics of South Asia and Peopling of India The Indo-Aryan migrations form part of a complex genetic puzzle on the origin and spread of the various components of the Indian population, including various waves of admixture and language shift. Studies indicate north and south Indians share a common maternal ancestry. A series of studies show that the Indian subcontinent harbours two major ancestral components, namely the ''Ancestral North Indians'' (ANI) which is "genetically close to Middle Easterners, Central Asians, and Europeans", and the ''Ancestral South Indians'' (ASI) which is clearly distinct from ANI. These two groups mixed in India between 4,200 and 1,900 years ago (2200 BCE – 100 CE), after which a shift to endogamy took place, possibly by the enforcement of "social values and norms" during the Gupta Empire.<sup>[''when?'']</sup> Moorjani et al. (2013) describe three scenarios regarding the bringing together of the two groups: migrations before the development of agriculture before 8,000–9,000 years before present (BP); migration of western Asian people together with the spread of agriculture, maybe up to 4,600 years BP; migrations of western Eurasians from 3,000 to 4,000 years BP. While Reich notes that the onset of admixture coincides with the arrival of Indo-European language, according to Moorjani et al. (2013) these groups were present "unmixed" in India before the Indo-Aryan migrations. Gallego Romero et al. (2011) propose that the ANI component came from Iran and the Middle East, less than 10,000 years ago, while according to Lazaridis et al. (2016) ANI is a mix of "early farmers of western Iran" and "people of the Bronze Age Eurasian steppe". Several studies also show traces of later influxes of maternal genetic material and of paternal genetic material related to ANI and possibly the Indo-Europeans. While others have analysed the hereditary distribution of lactose intolerance, and specifically the presence of the -13910T lactase persistence mutation, found in Europe and Central Asia, across South Asia. === Literary research: similarities, geography, and references to migration === The oldest known inscribed Indo-Iranian words, and particularly invocations of the Indo-Aryan deities, date to mid second millennia BCE, as loan words in Hurrian treaties of the Mitanni kingdom, of present-day northern Syria. The religious practices depicted in the ''Rigveda'' and those depicted in the ''Avesta'', the central religious text of Zoroastrianism, show similarities. Some of the references to the Sarasvati in the Rigveda refer to the Ghaggar-Hakra River, while the Afghan river Haraxvaiti/Harauvati Helmand is sometimes quoted as the locus of the early Rigvedic river.<sup>[''needs context'']</sup> The Rigveda does not explicitly refer to an external homeland or to a migration, but later Vedic and Puranic texts do show the movement into the Gangetic plains. A number of Indologists and historians offering the Baudhayana Shrauta Sutra, verse 18.44:397.9, as explicit recorded evidence of a migration:<blockquote>Then, there is the following direct statement contained in (the admittedly much later) BSS [Baudhāyana Śrauta Sūtra] 18.44:397.9 sqq which has once again been overlooked, not having been translated yet: "Ayu went eastwards. His (people) are the Kuru Panchala and the Kasi-Videha. This is the Ayava (migration). (His other people) stayed at home. His people are the Gandhari, Parsu and Aratta. This is the Amavasava (group)" (Witzel 1989: 235).</blockquote> === Ecological studies: widespread drought, urban collapse, and pastoral migrations === Climate change and drought may have triggered both the initial dispersal of Indo-European speakers, and the migration of Indo-Europeans from the steppes in south central Asia and India. Around 4200–4100 BCE a climate change occurred, manifesting in colder winters in Europe. Steppe herders, archaic Proto-Indo-European speakers, spread into the lower Danube valley about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. The Yamna horizon was an adaptation to a climate change which occurred between 3500 and 3000 BCE, in which the steppes became drier and cooler. Herds needed to be moved frequently to feed them sufficiently, and the use of wagons and horse-back riding made this possible, leading to "a new, more mobile form of pastoralism". In the third millennium BCE widespread aridification led to water shortages and ecological changes in both the Eurasian steppes and the Indian subcontinent. On the steppes, humidification led to a change of vegetation, triggering "higher mobility and transition to nomadic cattle breeding". Water shortage also had a strong impact in the Indian subcontinent, "causing the collapse of sedentary urban cultures in south central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations". == Development of the theory == === Similarities between Sanskrit, Persian, Greek === In the 16th century, European visitors to India became aware of similarities between Indian and European languages and as early as 1653 Van Boxhorn had published a proposal for a proto-language ("Scythian") for Germanic, Romance, Greek, Baltic, Slavic, Celtic, Iranian, and (incorrectly) Turkish. In a memoir sent to the French Academy of Sciences in 1767 Gaston-Laurent Coeurdoux, a French Jesuit who spent all his life in India, had specifically demonstrated the existing analogy between Sanskrit and European languages. In 1786 William Jones, a judge in the Supreme Court of Judicature at Fort William, Calcutta, linguist, and classics scholar, on studying Sanskrit, postulated, in his ''Third Anniversary Discourse'' to the Asiatic Society, a proto-language uniting Sanskrit, Persian, Greek, Latin, Gothic and Celtic languages, but in many ways his work was less accurate than his predecessors', as he erroneously included Egyptian, Japanese and Chinese in the Indo-European languages, while omitting Hindustani and Slavic:<blockquote>The Sanskrit language, whatever be its antiquity, is of a wonderful structure; more perfect than the Greek, more copious than the Latin, and more exquisitely refined than either, yet bearing to both of them a stronger affinity, both in the roots of verbs and in the forms of grammar, than could possibly have been produced by accident; so strong indeed, that no philologer could examine them all three, without believing them to have sprung from some common source, which, perhaps, no longer exists: there is a similar reason, though not quite so forcible, for supposing that both the Gothic and the Celtic, though blended with a very different idiom, had the same origin with the Sanskrit; and the old Persian might be added to the same family, if this were the place for discussing any question concerning the antiquities of Persia.</blockquote>Jones concluded that all these languages originated from the same source. === Homeland === Main article: Proto-Indo-European homeland Scholars assume a homeland either in central Asia or in Western Asia, and Sanskrit must in this case have reached India by a language transfer from west to east. In 19th century Indo-European studies, the language of the Rigveda was the most archaic Indo-European language known to scholars, indeed the only records of Indo-European that could reasonably claim to date to the Bronze Age. This primacy of Sanskrit inspired scholars such as Friedrich Schlegel, to assume that the locus of the proto-Indo-European homeland had been in India, with the other dialects spread to the west by historical migration. With the 20th-century discovery of Bronze-Age attestations of Indo-European (Anatolian, Mycenaean Greek), Vedic Sanskrit lost its special status as the most archaic Indo-European language known. === Aryan "race" === Main articles: Aryan race and Scientific racism In the 1850s Max Müller introduced the notion of two Aryan races, a western and an eastern one, who migrated from the Caucasus into Europe and India respectively. Müller dichotomized the two groups, ascribing greater prominence and value to the western branch. Nevertheless, this "eastern branch of the Aryan race was more powerful than the indigenous eastern natives, who were easy to conquer". Herbert Hope Risley expanded on Müller's two-race Indo-European speaking Aryan invasion theory, concluding that the caste system was a remnant of the Indo-Aryans domination of the native Dravidians, with observable variations in phenotypes between hereditary race-based castes. Thomas Trautmann explains that Risley "found a direct relation between the proportion of Aryan blood and the nasal index, along a gradient from the highest castes to the lowest. This assimilation of caste to race proved very influential." Müller's work contributed to the developing interest in Aryan culture, which often set Indo-European ('Aryan') traditions in opposition to Semitic religions. He was "deeply saddened by the fact that these classifications later came to be expressed in racist terms", as this was far from his intention. For Müller the discovery of common Indian and European ancestry was a powerful argument against racism, arguing that "an ethnologist who speaks of Aryan race, Aryan blood, Aryan eyes and hair, is as great a sinner as a linguist who speaks of a dolichocephalic dictionary or a brachycephalic grammar" and that "the blackest Hindus represent an earlier stage of Aryan speech and thought than the fairest Scandinavians". In his later work, Max Müller took great care to limit the use of the term "Aryan" to a strictly linguistic one. === "Aryan invasion" === The excavation of the Harappa, Mohenjo-daro and Lothal sites of the Indus Valley Civilisation (IVC) in the 1920, showed that northern India already had an advanced culture when the Indo-Aryans migrated into the area. The theory changed from a migration of advanced Aryans towards a primitive aboriginal population, to a migration of nomadic people into an advanced urban civilization, comparable to the Germanic migrations during the Fall of the Western Roman Empire, or the Kassite invasion of Babylonia. This possibility was for a short time seen as a hostile invasion into northern India. The decline of the Indus Valley Civilisation at precisely the period in history in which the Indo-Aryan migrations probably took place, seemed to provide independent support of such an invasion. This argument was proposed by the mid-20th century archaeologist Mortimer Wheeler, who interpreted the presence of many unburied corpses found in the top levels of Mohenjo-daro as the victims of conquest wars, and who famously stated that the god "Indra stands accused" of the destruction of the Civilisation. This position was discarded after finding no evidence of wars. The skeletons were found to be hasty interments, not massacred victims. Wheeler himself also nuanced this interpretation in later publications, stating "This is a possibility, but it can't be proven, and it may not be correct." Wheeler further notes that the unburied corpses may indicate an event in the final phase of human occupation of Mohenjo-Daro, and that thereafter the place was uninhabited, but that the decay of Mohenjo-Daro has to be ascribed to structural causes such as salinisation. Nevertheless, although 'invasion' was discredited, critics of the Indo-Aryan Migration theory continue to present the theory as an "Aryan Invasion Theory", presenting it as a racist and colonialist discourse:<blockquote>The theory of an immigration of IA speaking Arya ("Aryan invasion") is simply seen as a means of British policy to justify their own intrusion into India and their subsequent colonial rule: in both cases, a "white race" was seen as subduing the local darker colored population.</blockquote> === Aryan migration === In the later 20th century, ideas were refined along with data accrual, and migration and acculturation were seen as the methods whereby Indo-Aryans and their language and culture spread into northwest India around 1500 BCE. The term "invasion" is only being used nowadays by opponents<sup>[''who?'']</sup> of the Indo-Aryan Migration theory. Michael Witzel:<blockquote>...it has been supplanted by much more sophisticated models over the past few decades [...] philologists first, and archaeologists somewhat later, noticed certain inconsistencies in the older theory and tried to find new explanations, a new version of the immigration theories.</blockquote>The changed approach was in line with newly developed thinking about language transfer in general, such as the migration of the Greeks into Greece (between 2100 and 1600 BCE) and their adoption of a syllabic script, Linear B, from the pre-existing Linear A, with the purpose of writing Mycenaean Greek, or the Indo-Europeanization of Western Europe (in stages between 2200 and 1300 BCE). == Linguistics: relationships between languages == Linguistic research traces the connections between the various Indo-European languages, and reconstructs proto-Indo-European. Accumulated linguistic evidence points to the Indo-Aryan languages as intrusive into the Indian subcontinent, some time in the 2nd millennium BCE. The language of the Rigveda, the earliest stratum of Vedic Sanskrit, is assigned to about 1500–1200 BCE. === Comparative method === Main article: Comparative method Connections between languages can be traced because the processes that change languages are not random, but follow strict patterns. Especially sound shifts, the changing of vowels and consonants, are important, although grammar (especially morphology) and the lexicon (vocabulary) may also be significant. Historical-comparative linguistics thus makes it possible to see great similarities between languages which at first sight might seem very different. Linguistics use the comparative method to study the development of languages by performing a feature-by-feature comparison of two or more languages with common descent from a shared ancestor, as opposed to the method of internal reconstruction, which analyses the internal development of a single language over time. Ordinarily both methods are used together to reconstruct prehistoric phases of languages, to fill in gaps in the historical record of a language, to discover the development of phonological, morphological, and other linguistic systems, and to confirm or refute hypothesized relationships between languages.<sup>[''citation needed'']</sup> The comparative method aims to prove that two or more historically attested languages are descended from a single proto-language by comparing lists of cognate terms. From them, regular sound correspondences between the languages are established, and a sequence of regular sound changes can then be postulated, which allows the proto-language to be reconstructed. Relation is deemed certain only if at least a partial reconstruction of the common ancestor is feasible, and if regular sound correspondences can be established with chance similarities ruled out.<sup>[''citation needed'']</sup> The comparative method was developed over the 19th century. Key contributions were made by the Danish scholars Rasmus Rask and Karl Verner and the German scholar Jacob Grimm. The first linguist to offer reconstructed forms from a proto-language was August Schleicher, in his ''Compendium der vergleichenden Grammatik der indogermanischen Sprachen'', originally published in 1861. === Proto-Indo-European === Proto-Indo-European (PIE) is the linguistic reconstruction of the common ancestor of the Indo-European languages. August Schleicher's 1861 reconstruction of PIE was the first proposed proto-language to be accepted by modern linguists. More work has gone into reconstructing it than any other proto-language, and it is by far the best understood among all proto-languages of its age. During the 19th century, the vast majority of linguistic work was devoted to reconstruction of Proto-Indo-European or its daughter proto-languages such as Proto-Germanic, and most of the current techniques of linguistic reconstruction in historical linguistics (e.g., the comparative method and the method of internal reconstruction) were developed as a result. PIE must have been spoken as a single language or a group of related dialects (before divergence began), though estimates of when this was by different authorities can vary massively, from the 7th millennium BCE to the second. A number of hypotheses have been proposed for the origin and spread of the language, the most popular among linguists being the Kurgan hypothesis, which postulates an origin in the Pontic–Caspian steppe of Eastern Europe in the 5th or 4th millennia BCE. Features of the culture of the speakers of PIE, known as Proto-Indo-Europeans, have also been reconstructed based on the shared vocabulary of the early attested Indo-European languages. As mentioned above, the existence of PIE was first postulated in the 18th century by Sir William Jones, who observed the similarities between Sanskrit, Ancient Greek, and Latin. By the early 20th century, well-defined descriptions of PIE had been developed that are still accepted today (with some refinements). The largest developments of the 20th century were the discovery of the Anatolian and Tocharian languages and the acceptance of the laryngeal theory. The Anatolian languages have also spurred a major re-evaluation of theories concerning the development of various shared Indo-European language features and the extent to which these features were present in PIE itself.<sup>[''citation needed'']</sup> Relationships to other language families, including the Uralic languages, have been proposed but remain controversial.<sup>[''citation needed'']</sup> PIE is thought<sup>[''by whom?'']</sup> to have had a complex system of morphology that included inflectional suffixes as well as ablaut (vowel alterations, as preserved in English ''sing, sang, sung''). Nouns and verbs had complex systems of declension and conjugation respectively.<sup>[''citation needed'']</sup> === Arguments against an Indian origin of proto-Indo-European === ==== Diversity ==== According to the linguistic center of gravity principle, the most likely point of origin of a language family is in the area of its greatest diversity. By this criterion, Northern India, home to only a single branch of the Indo-European language family (i.e., Indo-Aryan), is an exceedingly unlikely candidate for the Indo-European homeland, compared to Central-Eastern Europe, for example, which is home to the Italic, Venetic, Illyrian, Albanian, Germanic, Baltic, Slavic, Thracian and Greek branches of Indo-European. Both mainstream Urheimat solutions locate the Proto-Indo-European homeland in the vicinity of the Black Sea. ==== Dialectal variation ==== {| class="wikitable" | |This section '''may be too technical for most readers to understand'''. Please help improve it to make it understandable to non-experts, without removing the technical details. ''(August 2020) (<small>Learn how and when to remove this template message</small>)'' |} It has been recognized since the mid-19th century, beginning with Schmidt and Schuchardt, that a binary tree model cannot capture all linguistic alignments; certain areal features cut across language groups and are better explained through a model treating linguistic change like waves rippling out through a pond. This is true of the Indo-European languages as well. Various features originated and spread while Proto-Indo-European was still a dialect continuum. These features sometimes cut across sub-families: for instance, the instrumental, dative and ablative plurals in Germanic and Balto-Slavic feature endings beginning with -m-, rather than the usual -*bh-, e.g. Gothic dative plural ''sunum'' 'to the sons' and Old Church Slavonic instrumental plural ''synъ-mi'' 'with sons', despite the fact that the Germanic languages are centum, while Balto-Slavic languages are satem. The strong correspondence between the dialectal relationships of the Indo-European languages and their actual geographical arrangement in their earliest attested forms makes an Indian origin, as suggested by the Out of India Theory, unlikely. ==== Substrate influence ==== Main article: Substratum in Vedic Sanskrit Already in the 1870s the Neogrammarians<sup>[''who?'']</sup> realised that the Greek/Latin vocalism couldn't be explained on the basis of the Sanskrit one, and therefore must be more original.<sup>[''citation needed'']</sup> The Indo-Iranian and Uralic languages influenced each other, with the Finno-Ugric languages containing Indo-European loan words. A telling example is the Finnish word ''vasara'', "hammer", which is related to ''vajra'', the weapon of Indra. Since the Finno-Ugric homeland was located in the northern forest zone in northern Europe, the contacts must have taken place – in line with the placement of the proto-Indo-European homeland at the Pontic-Caspian steppes – between the Black Sea and the Caspian Sea. Dravidian and other South Asian languages share with Indo-Aryan a number of syntactical and morphological features that are alien to other Indo-European languages, including even its closest relative, Old Iranian. Phonologically, there is the introduction of retroflexes, which alternate with dentals in Indo-Aryan; morphologically there are the gerunds; and syntactically there is the use of a quotative marker (''iti''). These are taken as evidence of substratum influence. It has been argued<sup>[''by whom?'']</sup> that Dravidian influenced Indic through "shift", whereby native Dravidian speakers learned and adopted Indic languages.<sup>[''citation needed'']</sup> The presence of Dravidian structural features in Old Indo-Aryan is thus plausibly explained, that the majority of early Old Indo-Aryan speakers had a Dravidian mother tongue which they gradually abandoned. Even though the innovative traits in Indic could be explained by multiple internal explanations, early Dravidian influence is the only explanation that can account for all of the innovations at once – it becomes a question of explanatory parsimony; moreover, early Dravidian influence accounts for several of the innovative traits in Indic better than any internal explanation that has been proposed. A pre-Indo-European linguistic substratum in the Indian subcontinent would be a good reason to exclude India as a potential Indo-European homeland. However, several linguists<sup>[''who?'']</sup>, all of whom accept the external origin of the Aryan languages on other grounds, are still open to considering the evidence as internal developments rather than the result of substrate influences, or as adstratum effects. == Archaeology: migrations from the steppe Urheimat == See also: Indo-European migrations {| class="wikitable" | {| class="wikitable mw-collapsible mw-collapsed" !Indo-European migration |} |- | {| class="wikitable mw-collapsible mw-collapsed" !Spread of IE-languages |} |} The Sintashta, Andronovo, Bactria-Margiana and Yaz cultures have been associated with Indo-Iranian migrations in Central Asia. The Gandhara Grave, Cemetery H, Copper Hoard and Painted Grey Ware cultures are candidates for subsequent cultures within South Asia associated with Indo-Aryan movements.<sup>[''needs context'']</sup> The decline of the Indus Valley Civilisation predates the Indo-Aryan migrations, but archeological data show a cultural continuity in the archeological record. Together with the presence of Dravidian loanwords in the Rigveda, this<sup>[''clarification needed'']</sup> argues in favor of an interaction between post-Harappan and Indo-Aryan cultures. === Stages of migrations === About 6,000 years ago the Indo-Europeans started to spread out from their proto-Indo-European homeland in Central Eurasia, between the southern Ural Mountains, the North Caucasus, and the Black Sea. About 4,000 years ago Indo-European speaking peoples started to migrate out of the Eurasian steppes. ==== Diffusion from the "Urheimat" ==== Main articles: Proto-Indo-European homeland, Kurgan hypothesis, and Yamnaya culture Scholars regard the middle Volga, which was the location of the Samara culture (late 6th and early 5th millennium BCE), and the Yamna culture, to be the "Urheimat" of the Indo-Europeans, as described by the Kurgan hypothesis. From this "Urheimat", Indo-European languages spread throughout the Eurasian steppes between c. 4,500 and 2,500 BCE, forming the Yamna culture. ==== Sequence of migrations ==== David Anthony gives an elaborate overview of the sequence of migrations. The oldest attested Indo-European language is Hittite, which belongs to the oldest written Indo-European languages, the Anatolian branch. Although the Hittites are placed in the 2nd millennium BCE, the Anatolian branch seems to predate Proto-Indo-European, and may have developed from an older Pre-Proto-Indo-European ancestor. If it separated from Proto-Indo-European, it is likely to have done so between 4500 and 3500 BCE. A migration of archaic Proto-Indo-European speaking steppe herders into the lower Danube valley took place about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. According to Mallory and Adams, migrations southward founded the Maykop culture (c. 3500–2500 BCE), and eastward the Afanasevo culture (c. 3500–2500 BCE), which developed into the Tocharians (c. 3700–3300 BCE). According to Anthony, between 3100 and 2800/2600 BCE, a real folk migration of Proto-Indo-European speakers from the Yamna-culture took place toward the west, into the Danube Valley. These migrations probably split off Pre-Italic, Pre-Celtic and Pre-Germanic from Proto-Indo-European. According to Anthony, this was followed by a movement north, which split away Baltic-Slavic c. 2800 BCE. Pre-Armenian split off at the same time. According to Parpola, this migration is related to the appearance of Indo-European speakers from Europe in Anatolia, and the appearance of Hittite. The Corded Ware culture in Middle Europe ( 2900–2450/2350 cal. BCE), has been associated with some of the languages in the Indo-European family. According to Haak et al. (2015) a massive migration took place from the Eurasian steppes to Central Europe. This migration is closely associated with the Corded Ware culture. The Indo-Iranian language and culture emerged in the Sintashta culture (c. 2050–1900 BCE), where the chariot was invented. Allentoft et al. (2015) found close autosomal genetic relationship between peoples of Corded Ware culture and Sintashta culture, which "suggests similar genetic sources of the two", and may imply that "the Sintashta derives directly from an eastward migration of Corded Ware peoples". The Indo-Iranian language and culture was further developed in the Andronovo culture (c. 2000–1450 BCE), and influenced by the Bactria–Margiana Archaeological Complex (c. 2250–1700 BCE). The Indo-Aryans split off sometime around 2000–1600 BCE from the Iranians, after which Indo-Aryan groups are thought to have moved to the Levant (Mitanni), the northern Indian subcontinent (Vedic people, c. 1500 BCE), and China (Wusun). Thereafter the Iranians migrated into Iran. === Central Asia: formation of Indo-Iranians === Indo-Iranian peoples are a grouping of ethnic groups consisting of the Indo-Aryan, Iranian and Nuristani peoples; that is, speakers of Indo-Iranian languages. The Proto-Indo-Iranians are commonly identified with the Andronovo culture, that flourished c. 2000–1450 BCE in an area of the Eurasian Steppe that borders the Ural River on the west, the Tian Shan on the east. The older Sintashta culture (2200–1900), formerly included within the Andronovo culture, is now considered separately, but regarded as its predecessor, and accepted as part of the wider Andronovo horizon. The Indo-Aryan migration was part of the Indo-Iranian migrations from the Andronovo culture into Anatolia, Iran and South Asia. ==== Sintashta-Petrovka culture ==== Main article: Sintashta culture The Sintashta culture, also known as the Sintashta-Petrovka culture or Sintashta-Arkaim culture, is a Bronze Age archaeological culture of the northern Eurasian Steppe on the borders of Eastern Europe and Central Asia, dated to the period 2200–1900 BCE. The Sintashta culture is probably the archaeological manifestation of the Indo-Iranian language group. The Sintashta culture emerged from the interaction of two antecedent cultures. Its immediate predecessor in the Ural-Tobol steppe was the Poltavka culture, an offshoot of the cattle-herding Yamnaya horizon that moved east into the region between 2800 and 2600 BCE. Several Sintashta towns were built over older Poltovka settlements or close to Poltovka cemeteries, and Poltovka motifs are common on Sintashta pottery. Sintashta material culture also shows the influence of the late Abashevo culture, a collection of Corded Ware settlements in the forest steppe zone north of the Sintashta region that were also predominantly pastoralist. Allentoft et al. (2015) also found close autosomal genetic relationship between peoples of Corded Ware culture and Sintashta culture. The earliest known chariots have been found in Sintashta burials, and the culture is considered a strong candidate for the origin of the technology, which spread throughout the Old World and played an important role in ancient warfare. Sintashta settlements are also remarkable for the intensity of copper mining and bronze metallurgy carried out there, which is unusual for a steppe culture. Because of the difficulty of identifying the remains of Sintashta sites beneath those of later settlements, the culture was only recently distinguished from the Andronovo culture. It is now recognised as a separate entity forming part of the 'Andronovo horizon'. ==== Andronovo culture ==== Main article: Andronovo culture The Andronovo culture is a collection of similar local Bronze Age Indo-Iranian cultures that flourished <abbr>c.</abbr> 2000–1450 BC in western Siberia and the central Eurasian Steppe. It is probably better termed an archaeological complex or archaeological horizon. The name derives from the village of Andronovo (55°53′N 55°42′E), where in 1914, several graves were discovered, with skeletons in crouched positions, buried with richly decorated pottery. The older Sintashta culture (2050–1900 BCE), formerly included within the Andronovo culture, is now considered<sup>[''by whom?'']</sup> separately, but regarded as its predecessor, and accepted as part of the wider Andronovo horizon. Currently only two sub-cultures are considered as part of Andronovo culture: * '''Alakul''' (2000–1700 BC) between Oxus (today Amu Darya), and Jaxartes, Kyzylkum desert * '''Fëdorovo''' (2000–1450 BC) in southern Siberia (earliest evidence of cremation and fire cult) Other authors identified previously the following sub-cultures also as part of Andronovo: * '''Eastern Fedorovo''' (1750–1500 BC) in Tian Shan mountains (Northwestern Xinjiang, China), southeastern Kazakhstan, eastern Kyrgyzstan * '''Alekseyevka''' (1200–1000 BC) "final Bronze Age phase" in eastern Kazakhstan, contacts with Namazga VI in Turkmenia The geographical extent of the culture is vast and difficult to delineate exactly. On its western fringes, it overlaps with the approximately contemporaneous, but distinct, Srubna culture in the Volga–Ural interfluvial. To the east, it reaches into the Minusinsk depression, with some sites as far west as the southern Ural Mountains, overlapping with the area of the earlier Afanasevo culture. Additional sites are scattered as far south as the Kopet Dag (Turkmenistan), the Pamir (Tajikistan) and the Tian Shan (Kyrgyzstan). The northern boundary vaguely corresponds to the beginning of the Taiga. In the Volga basin, interaction with the Srubna culture was the most intense and prolonged, and Federovo style pottery is found as far west as Volgograd. Towards the middle of the 2nd millennium, the Andronovo cultures begin to move intensively eastwards. They mined deposits of copper ore in the Altai Mountains and lived in villages of as many as ten sunken log cabin houses measuring up to 30m by 60m in size. Burials were made in stone cists or stone enclosures with buried timber chambers. In other respects, the economy was pastoral, based on cattle, horses, sheep, and goats. While agricultural use has been posited,<sup>[''by whom?'']</sup> no clear evidence has been presented. Studies associate the Andronovo horizon with early Indo-Iranian languages, though it may have overlapped the early Uralic-speaking area at its northern fringe, including the Turkic-speaking area at its northeastern fringe. Based on its use by Indo-Aryans in Mitanni and Vedic India, its prior absence in the Near East and Harappan India, and its 19–20th century BCE attestation at the Andronovo site of Sintashta, Kuz'mina (1994) argues that the chariot corroborates the identification of Andronovo as Indo-Iranian. Anthony & Vinogradov (1995) dated a chariot burial at Krivoye Lake to about 2000 BCE and a Bactria-Margiana burial that also contains a foal has recently been found, indicating further links with the steppes. Mallory acknowledges the difficulties of making a case for expansions from Andronovo to northern India, and that attempts to link the Indo-Aryans to such sites as the Beshkent and Vakhsh cultures "only gets the Indo-Iranian to Central Asia, but not as far as the seats of the Medes, Persians or Indo-Aryans". He has developed the "kulturkugel" model that has the Indo-Iranians taking over Bactria-Margiana cultural traits but preserving their language and religion<sup>[''contradictory'']</sup> while moving into Iran and India. Fred Hiebert also agrees that an expansion of the BMAC into Iran and the margin of the Indus Valley is "the best candidate for an archaeological correlate of the introduction of Indo-Iranian speakers to Iran and South Asia." According to Narasimhan et al. (2018), the expansion of the Andronovo culture towards the BMAC took place via the Inner Asia Mountain Corridor. ==== Bactria-Margiana culture ==== Main article: Bactria–Margiana Archaeological Complex The Bactria-Margiana Culture, also called "Bactria-Margiana Archaeological Complex", was a non-Indo-European culture which influenced the Indo-Iranians. It was centered in what is nowadays northwestern Afghanistan and southern Turkmenistan. Proto-Indo-Iranian arose due to this influence. The Indo-Iranians also borrowed their distinctive religious beliefs<sup>[''contradictory'']</sup> and practices from this culture. According to Anthony, the Old Indic religion probably emerged among Indo-European immigrants in the contact zone between the Zeravshan River (present-day Uzbekistan) and (present-day) Iran. It was "a syncretic mixture of old Central Asian and new Indo-European elements", which borrowed "distinctive religious beliefs and practices" from the Bactria–Margiana culture. At least 383 non-Indo-European words were borrowed from this culture, including the god Indra and the ritual drink Soma. The characteristically Bactria-Margiana (southern Turkmenistan/northern Afghanistan) artifacts found at burials in Mehrgarh and Balochistan are explained by a movement of peoples from Central Asia to the south. The Indo-Aryan tribes may have been present in the area of the BMAC from 1700 BCE at the latest (incidentally corresponding with the decline of that culture). From the BMAC, the Indo-Aryans moved into the Indian subcontinent. According to Bryant, the Bactria-Margiana material inventory of the Mehrgarh and Baluchistan burials is "evidence of an archaeological intrusion into the subcontinent from Central Asia during the commonly accepted time frame for the arrival of the Indo-Aryans". ==== Multiple waves of migration into northern India ==== See also: Inner–Outer hypothesis According to Parpola, Indo-Aryan clans migrated into South Asia in subsequent waves. This explains the diversity of views found in the Rig Veda, and may also explain the existence of various Indo-Aryan cultural complexes in the later Vedic period, namely the Vedic culture centered on the Kuru Kingdom in the heartland of Aryavarta in the western Ganges plain, and the cultural complex of Greater Magadha at the eastern Ganges plain, which gave rise to Jainism and Buddhism. Writing in 1998, Parpola postulated a first wave of immigration from as early as 1900 BCE, corresponding to the Cemetery H culture and the Copper Hoard culture, c.q. Ochre Coloured Pottery culture, and an immigration to the Punjab . 1700–1400 BCE. In 2020, Parpola proposed an even earlier wave of proto-Indo-Iranian speaking people from the Sintashta culture into India at c. 1900 BCE, related to the Copper Hoard Culture, followed by a pre-Rig Vedic Indo-Aryan wave of migration:<blockquote>It seems, then, that the earliest Aryan-speaking immigrants to South Asia, the Copper Hoard people, came with bull-drawn carts (Sanauli and Daimabad) via the BMAC and had Proto-Indo-Iranian as their language. They were, however, soon followed (and probably at least partially absorbed) by early Indo-Aryans.</blockquote>This pre-Rig-Vedic wave of migration by early Indo-Aryans is associated by Parpola with "the early (Ghalegay IV–V) phase of the Gandhara Grave culture" and the Atharva Veda tradition, and related to the Petrovka culture. The Rig-Vedic wave followed several centuries later, "perhaps in the fourteenth century BCE", and is associated by Parpola with the Fedorovo culture. According to Kochhar there were three waves of Indo-Aryan immigration that occurred after the mature Harappan phase: # the "Murghamu" (Bactria-Margiana culture) related people who entered Balochistan at Pirak, Mehrgarh south cemetery, and other places, and later merged with the post-urban Harappans during the late Harappans Jhukar phase (2000–1800 BCE); # the Swat IV that co-founded the Harappan Cemetery H phase in Punjab (2000–1800 BCE); # and the Rigvedic Indo-Aryans of Swat V that later absorbed the Cemetery H people and gave rise to the Painted Grey Ware culture (PGW) (to 1400 BCE). ===== Gandhara grave culture and Ochre Coloured Pottery culture ===== Main articles: Gandhara grave culture and Ochre Coloured Pottery culture The standard model<sup>[''by whom?'']</sup> for the entry of the Indo-European languages into India is that Indo-Aryan migrants went over the Hindu Kush, forming the Gandhara grave culture or Swat culture, in present-day Swat valley, into the headwaters of either the Indus or the Ganges (probably both). The Gandhara grave culture, which emerged c. 1600 BCE and flourished from c. 1500 BCE to 500 BCE in Gandhara, modern-day Pakistan and Afghanistan, is thus the most likely locus of the earliest bearers of Rigvedic culture. About 1800 BCE, there is a major cultural change in the Swat Valley with the emergence of the Gandhara grave culture. With its introduction of new ceramics, new burial rites, and the horse, the Gandhara grave culture is a major candidate for early Indo-Aryan presence. The two new burial rites—flexed inhumation in a pit and cremation burial in an urn—were, according to early Vedic literature, both practiced in early Indo-Aryan society. Horse-trappings indicate the importance of the horse to the economy of the Gandharan grave culture. Two horse burials indicate the importance of the horse in other respects. Horse burial is a custom that Gandharan grave culture has in common with Andronovo, though not within the distinctive timber-frame graves of the steppe. Parpola (2020) states:<blockquote>The dramatic new discovery of cart burials dated to c. 1900 at Sinauli have been reviewed in this paper, and they support my proposal of a pre-Ṛvedic wave (now set of waves) of Aryan speakers arriving in South Asia and their making contact with the Late Harappans.</blockquote> === Two waves of Indo-Iranian migration === See also: Indo-Iranians The Indo-Iranian migrations took place in two waves, belonging to the second and the third stage of Beckwith's description of the Indo-European migrations. The first wave consisted of the Indo-Aryan migration into the Levant, seemingly founding the Mitanni kingdom in northern Syria (c. 1600–1350 BCE), and the migration south-eastward of the Vedic people, over the Hindu Kush into northern India. Christopher I. Beckwith suggests that the Wusun, an Indo-European Europoid people of Inner Asia in antiquity, were also of Indo-Aryan origin. The second wave is interpreted as the Iranian wave. === First wave – Indo-Aryan migrations === ==== Mittani ==== Main article: Mitanni Mitanni (Hittite cuneiform ''KUR<sup>URU</sup>Mi-ta-an-ni''), also Mittani (''Mi-it-ta-ni'') or Hanigalbat (Assyrian Hanigalbat, Khanigalbat cuneiform ''Ḫa-ni-gal-bat'') or Naharin in ancient Egyptian texts was a Hurrian-speaking state in northern Syria and south-east Anatolia from <abbr>c.</abbr> 1600 BCE – 1350 BCE. According to one hypothesis, founded by an Indo-Aryan ruling class governing a predominately Hurrian population, Mitanni came to be a regional power after the Hittite destruction of Amorite Babylon and a series of ineffectual Assyrian kings created a power vacuum in Mesopotamia. At the beginning of its history, Mitanni's major rival was Egypt under the Thutmosids. However, with the ascent of the Hittite empire, Mitanni and Egypt made an alliance to protect their mutual interests from the threat of Hittite domination.<sup>[''citation needed'']</sup> At the height of its power, during the 14th century BCE, Mitanni had outposts centered on its capital, Washukanni, whose location has been determined by archaeologists to be on the headwaters of the Khabur River. Their sphere of influence is shown in Hurrian place names, personal names and the spread through Syria and the Levant of a distinct pottery type. Eventually, Mitanni succumbed to Hittite and later Assyrian attacks, and was reduced to the status of a province of the Middle Assyrian Empire.<sup>[''citation needed'']</sup> The earliest written evidence for an Indo-Aryan language is found not in Northwestern India and Pakistan, but in northern Syria, the location of the Mitanni kingdom. The Mitanni kings took Old Indic throne names, and Old Indic technical terms were used for horse-riding and chariot-driving. The Old Indic term r'ta, meaning "cosmic order and truth", the central concept of the Rigveda, was also employed in the Mitanni kingdom. Old Indic gods, including Indra, were also known in the Mitanni kingdom. ==== North-India – Vedic culture ==== {| class="wikitable mw-collapsible mw-collapsed" !Spread of Vedic culture |} ===== Spread of Vedic-Brahmanic culture ===== Main article: Vedic period During the Early Vedic Period (c. 1500–800 BCE) the Indo-Aryan culture was centered in the northern Punjab, or Sapta Sindhu. During the Later Vedic Period (c. 800–500 BCE) the Indo-Aryan culture started to extend into the western Ganges Plain, centering on the Vedic Kuru and Panchala area, and had some influence at the central Ganges Plain after 500 BCE. Sixteen Mahajanapada developed at the Ganges Plain, of which the Kuru and Panchala became the most notable developed centers of Vedic culture, at the western Ganges Plain. The Central Ganges Plain, where Magadha gained prominence, forming the base of the Maurya Empire, was a distinct cultural area, with new states arising after 500 BCE during the so-called "Second urbanisation". It was influenced by the Vedic culture, but differed markedly from the Kuru-Panchala region. It "was the area of the earliest known cultivation of rice in the Indian subcontinent and by 1800 BCE was the location of an advanced neolithic population associated with the sites of Chirand and Chechar". In this region the Shramanic movements flourished, and Jainism and Buddhism originated. ==== Indus Valley Civilization ==== The Indo-Aryan migration into the northern Punjab started shortly after the decline of the Indus Valley civilisation (IVC). According to the "Aryan Invasion Theory" this decline was caused by "invasions" of barbaric and violent Aryans who conquered the IVC. This "Aryan Invasion Theory" is not supported by the archeological and genetic data, and is not representative of the "Indo-Aryan migration theory".<sup>[''citation needed'']</sup> ===== Decline of Indus Valley Civilisation ===== The decline of the IVC from about 1900 BCE started before the onset of the Indo-Aryan migrations, caused by aridisation due to shifting mossoons. A regional cultural discontinuity occurred during the second millennium BCE and many Indus Valley cities were abandoned during this period, while many new settlements began to appear in Gujarat and East Punjab and other settlements such as in the western Bahawalpur region increased in size.<sup>[''citation needed'']</sup> Jim G. Shaffer and Lichtenstein contend that in the second millennium BCE considerable "location processes" took place. In the eastern Punjab 79.9% and in Gujarat 96% of sites changed settlement status. According to Shaffer & Lichtenstein,<blockquote>It is evident that a major geographic population shift accompanied this 2nd millennium BCE localisation process. This shift by Harappan and, perhaps, other Indus Valley cultural mosaic groups, is the only archaeologically documented west-to-east movement of human populations in the Indian subcontinent before the first half of the first millennium B.C.</blockquote> ===== Continuity of Indus Valley civilization ===== According to Erdosy, the ancient Harappans were not markedly different from modern populations in Northwestern India and present-day Pakistan. Craniometric data showed similarity with prehistoric peoples of the Iranian plateau and Western Asia, although Mohenjo-daro was distinct from the other areas of the Indus Valley. According to Kennedy, there is no evidence of "demographic disruptions" after the decline of the Harappa culture. Kenoyer notes that no biological evidence can be found for major new populations in post-Harappan communities. Hemphill notes that "patterns of phonetic affinity" between Bactria and the Indus Valley Civilisation are best explained by "a pattern of long-standing, but low-level bidirectional mutual exchange". According to Kennedy, the Cemetery H culture "shows clear biological affinities" with the earlier population of Harappa. The archaeologist Kenoyer noted that this culture "may only reflect a change in the focus of settlement organization from that which was the pattern of the earlier Harappan phase and not cultural discontinuity, urban decay, invading aliens, or site abandonment, all of which have been suggested in the past." Recent excavations in 2008 at Alamgirpur, Meerut District, appeared to show an overlap between the Harappan and Painted Grey Ware culture (PGW) pottery indicating cultural continuity. ===== Relation with Indo-Aryan migrations ===== According to Kenoyer, the decline of the Indus Valley Civilisation is not explained by Aryan migrations, which took place after the decline of the Indus Valley Civilisation. Yet, according to Erdosy,<blockquote>Evidence in material culture for systems collapse, abandonment of old beliefs and large-scale, if localised, population shifts in response to ecological catastrophe in the 2nd millennium B.C. must all now be related to the spread of Indo-Aryan languages.</blockquote>Erdosy, testing hypotheses derived from linguistic evidence against hypotheses derived from archaeological data, states that there is no evidence of "invasions by a barbaric race enjoying technological and military superiority", but "some support was found in the archaeological record for small-scale migrations from Central Asia to the Indian subcontinent in the late 3rd/early 2nd millennia BCE". According to Erdosy, the postulated movements within Central Asia can be placed within a processional framework, replacing simplistic concepts of "diffusion", "migrations" and "invasions". Scholars have argued that the historical Vedic culture is the result of an amalgamation of the immigrating Indo-Aryans with the remnants of the indigenous civilization, such as the Ochre Coloured Pottery culture. Such remnants of IVC culture are not prominent in the Rigveda, with its focus on chariot warfare and nomadic pastoralism in stark contrast with an urban civilization.<sup>[''citation needed'']</sup> ==== Inner Asia – Wusun and Yuezhi ==== Main articles: Wusun and Yuezhi According to Christopher I. Beckwith the Wusun, an Indo-European Caucasian people of Inner Asia in antiquity, were also of Indo-Aryan origin. From the Chinese term Wusun, Beckwith reconstructs the Old Chinese *âswin, which he compares to the Old Indic aśvin "the horsemen", the name of the Rigvedic twin equestrian gods. Beckwith suggests that the Wusun were an eastern remnant of the Indo-Aryans, who had been suddenly pushed to the extremeties of the Eurasian Steppe by the Iranian peoples in the 2nd millennium BCE. The Wusun are first mentioned<sup>[''when?'']</sup> by Chinese sources as vassals in the Tarim Basin of the Yuezhi, another Indo-European Caucasian people of possible Tocharian stock. Around 175 BCE, the Yuezhi were utterly defeated by the Xiongnu, also former vassals of the Yuezhi. The Yuezhi subsequently attacked the Wusun and killed their king (Kunmo Chinese: 昆莫 or Kunmi Chinese: 昆彌) Nandoumi (Chinese: 難兜靡), capturing the Ili Valley from the Saka (Scythians) shortly afterwards. In return the Wusun settled in the former territories of the Yuezhi as vassals of the Xiongnu. The son of Nandoumi was adopted by the Xiongnu king and made leader of the Wusun. Around 130 BCE he attacked and utterly defeated the Yuezhi, settling the Wusun in the Ili Valley. After the Yuezhi were defeated by the Xiongnu, in the 2nd century BCE, a small group, known as the Little Yuezhi, fled to the south, while the majority migrated west to the Ili Valley, where they displaced the Sakas (Scythians). Driven from the Ili Valley shortly afterwards by the Wusun, the Yuezhi migrated to Sogdia and then Bactria, where they are often identified with the ''Tókharoi'' (Τοχάριοι) and ''Asii'' of Classical sources. They then expanded into northern Indian subcontinent, where one branch of the Yuezhi founded the Kushan Empire. The Kushan empire stretched from Turpan in the Tarim Basin to Pataliputra on the Indo-Gangetic Plain at its greatest extent, and played an important role in the development of the Silk Road and the transmission of Buddhism to China. Soon after 130 BCE the Wusun became independent of the Xiongnu, becoming trusted vassals of the Han dynasty and powerful force in the region for centuries. With the emerging steppe federations of the Rouran, the Wusun migrated into the Pamir Mountains in the 5th century CE. They are last mentioned in 938 when a Wusun chieftain paid tribute to the Liao dynasty. === Second wave – Iranians === {| class="wikitable" | |This section '''does not cite any sources'''. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. ''(August 2020) (<small>Learn how and when to remove this template message</small>)'' |} The first Iranians to reach the Black Sea may have been the Cimmerians in the 8th century BCE, although their linguistic affiliation is uncertain. They were followed by the Scythians<sup>[''when?'']</sup>, who would dominate the area, at their height, from the Carpathian Mountains in the west, to the easternmost fringes of Central Asia in the east. For most of their existence, the Scythians were based in what is modern-day Ukraine and southern European Russia. Sarmatian tribes, of whom the best known are the Roxolani (Rhoxolani), Iazyges (Jazyges) and the Alans, followed the Scythians westwards into Europe in the late centuries BCE and the 1st and 2nd centuries of the Common Era (The Migration Period). The populous Sarmatian tribe of the Massagetae, dwelling near the Caspian Sea, were known to the early rulers of Persia in the Achaemenid Period. In the east, the Scythians occupied several areas in Xinjiang, from Khotan to Tumshuq. The Medes, Parthians and Persians begin to appear on the western Iranian Plateau from c. 800 BCE, after which they remained under Assyrian rule for several centuries, as it was with the rest of the peoples in the Near East. The Achaemenids replaced Median rule from 559 BCE. Around the first millennium of the Common Era (AD), the Kambojas, the Pashtuns and the Baloch began to settle on the eastern edge of the Iranian Plateau, on the mountainous frontier of northwestern and western Pakistan, displacing the earlier Indo-Aryans from the area. In Central Asia, the Turkic languages have marginalized Iranian languages as a result of the Turkic migration of the early centuries CE. In Eastern Europe, Slavic and Germanic peoples assimilated and absorbed the native Iranian languages (Scythian and Sarmatian) of the region. Extant major Iranian languages are Persian, Pashto, Kurdish, and Balochi, besides numerous smaller ones. == Anthropology: elite recruitment and language shift == See also: Language shift === Elite dominance === Small groups can change a larger cultural area, and elite male dominance by small groups may have led to a language shift in northern India. Thapar notes that Indo-Aryan chiefs may have provided protection to non-Aryan agriculturalists, offering a system of patronage placing the chiefs in a superior position. This would have involved bilingualism, resulting in the adoption of Indo-Aryan languages by local populations. According to Parpola, local elites joined "small but powerful groups" of Indo-European speaking migrants. These migrants had an attractive social system and good weapons, and luxury goods which marked their status and power. Joining these groups was attractive for local leaders, since it strengthened their position, and gave them additional advantages. These new members were further incorporated by matrimonial alliances. === Renfrew: models of "linguistic replacement" === Basu et al. refer to Renfrew, who described four models for "linguistic replacement": # The demographic-subsistence model, exemplified by the process of agricultural dispersal, in which the incoming group has exploitive technologies which makes them dominant. It may lead to significant gene flow, and significant genetic changes in the population. But it may also lead to acculturalisation, in which case the technologies are taken over, but there is less change in the genetic composition of the population; # The existence of extended trading systems which led to the development of a lingua franca, in which case some gene flow is to be expected; # The elite dominance model, in which "a relatively small but well-organized group [...] take[s] over the system". Given the small size of the elite, its genetic influence may also be small, though "preferential access to marriage partners" may result in a relatively strong influence on the gene pool. Sexual asymmetry may also be of influence: incoming elites often consist mostly of males, who have no influence on the mitochondrial DNA of the gene pool, but may influence the Y chromosomes of the gene pool; # System collapse, in which territorial boundaries are changed, and elite dominance may appear for a while. === David Anthony: elite recruitment === David Anthony, in his "revised Steppe hypothesis" notes that the spread of the Indo-European languages probably did not happen through "chain-type folk migrations", but by the introduction of these languages by ritual and political elites, which are emulated by large groups of people. Anthony gives the example of the Southern Luo-speaking Acholi in northern Uganda in the 17th and 18th century, whose language spread rapidly in the 19th century. Anthony notes that "Indo-European languages probably spread in a similar way among the tribal societies of prehistoric Europe", carried forward by "Indo-European chiefs" and their "ideology of political clientage". Anthony notes that "elite recruitment" may be a suitable term for this system. === Michael Witzel: small groups and acculturation === Michael Witzel refers to Ehret's model "which stresses the osmosis, or a 'billiard ball', or Mallory's ''Kulturkugel'', effect of cultural transmission". According to Ehret, ethnicity and language can shift with relative ease in small societies, due to the cultural, economic and military choices made by the local population in question. The group bringing new traits may initially be small, contributing features that can be fewer in number than those of the already local culture. The emerging combined group may then initiate a recurrent, expansionist process of ethnic and language shift. Witzel notes that "arya/ārya does not mean a particular 'people' or even a particular 'racial' group but all those who had joined the tribes speaking Vedic Sanskrit and adhering to their cultural norms (such as ritual, poetry, etc.)." According to Witzel, "there must have been a long period of acculturation between the local population and the 'original' immigrants speaking Indo-Aryan." Witzel also notes that the speakers of Indo-Aryan and the local population must have been bilingual, speaking each other's languages and interacting with each other, before the Rg Veda was composed in the Punjab. === Salmons: systematic changes in community structure === Joseph Salmons notes that Anthony presents scarce concrete evidence or arguments. Salmons is critical about the notion of "prestige" as a central factor in the shift to Indo-European languages, referring to Milroy who notes that "prestige" is "a cover term for a variety of very distinct notions". Instead, Milroy offers "arguments built around network structure", though Salmons also notes that Anthony includes several of those arguments, "including political and technological advantages". According to Salmons, the best model is offered by Fishman, who<blockquote>... understands shift in terms of geographical, social, and cultural "dislocation" of language communities. Social dislocation, to give the most relevant example, involves "siphoning off the talented, the enterprising, the imaginative and the creative" ([Fishman] 1991: 61), and sounds strikingly like Anthony's 'recruitment' scenario.</blockquote>Salmons himself argues that<blockquote>... systematic changes in community structure are what drive language shift, incorporating Milroy's network structures as well. The heart of the view is the quintessential element of modernization, namely a shift from local community-internal organization to regional (state or national or international, in modern settings), extra-community organizations. Shift correlates with this move from pre-dominantly "horizontal" community structures to more "vertical" ones.</blockquote> == Genetics: ancient ancestry and multiple gene flows == See also: Genetics and archaeogenetics of South Asia and Peopling of India India has one of the most genetically diverse populations in the world, and the history of this genetic diversity is the topic of continued research and debate. The Indo-Aryan migrations form part of a complex genetical puzzle on the origin and spread of the various components of the Indian population, including various waves of admixture and language shift. The genetic impact of the Indo-Aryans may have been marginal, but this is not at odds with the cultural and linguistic influence, since language shift is possible without a change in genetics. === Ancestral groups === ==== Common maternal ancestry ==== Sahoo et al. (2006) states that "there is general agreement<sup>[''clarification needed'']</sup> that Indian caste and tribal populations share a common late Pleistocene maternal ancestry in India." Kivisild et al. (1999) concluded that there is "an extensive deep late Pleistocene<sup>[''jargon'']</sup> genetic link between contemporary Europeans and Indians" via the mitochondrial DNA, that is, DNA which is inherited from the mother. According to them, the two groups split at the time of the peopling of Asia and Eurasia and before modern humans entered Europe. Kivisild et al. (2000) note that "the sum of any recent (the last 15,000 years) western mtDNA gene flow to India comprises, in average, less than 10 percent of the contemporary Indian mtDNA lineages." Kivisild et al. (2003) and Sharma et al. (2005) note that north and south Indians share a common maternal ancestry: Kivisild et al. (2003) further note that "these results show that Indian tribal and caste populations derive largely from the same genetic heritage of Pleistocene<sup>[''jargon'']</sup> southern and western Asians and have received limited gene flow from external regions since the Holocene.<sup>[''jargon'']</sup> ==== "Ancestral North Indians" and "Ancestral South Indians" ==== Reich et al. (2009), in a collaborative effort between the Harvard Medical School and the Centre for Cellular and Molecular Biology (CCMB), examined the entire genomes worth 560,000 single nucleotide polymorphisms (SNPs), as compared to 420 SNPs in prior work. They also cross-compared them with the genomes of other regions available in the global genome database. Through this study, they were able to discern two genetic groups in the majority of populations in India, which they called "Ancestral North Indians" (ANI) and "Ancestral South Indians" (ASI). They found that the ANI genes are close to those of Middle Easterners, Central Asians and Europeans whereas the ASI genes are dissimilar to all other known populations outside India, though the indigenous Andamanese were determined to be the most closely related to the ASI population of any living group (albeit distinct from the ASI). These two distinct groups, which had split ca. 50,000 years ago, formed the basis for the present population of India. The two groups mixed between 1,900 and 4,200 years ago (2200 BCE – 100 CE), where-after a shift to endogamy took place and admixture became rare. Speaking to Fountain Ink, David Reich stated, "Prior to 4,200 years ago, there were unmixed groups in India. Sometime between 1,900 to 4,200 years ago, profound, pervasive convulsive mixture occurred, affecting every Indo-European and Dravidian group in India without exception." Reich pointed out that their work does not show that a substantial migration occurred during this time. Metspalu et al. (2011), representing a collaboration between the Estonian Biocenter and CCMB, confirmed that the Indian populations are characterized by two major ancestry components. One of them is spread at comparable frequency and haplotype diversity in populations of South and West Asia and the Caucasus. The second component is more restricted to South Asia and accounts for more than 50% of the ancestry in Indian populations. Haplotype diversity associated with these South Asian ancestry components is significantly higher than that of the components dominating the West Eurasian ancestry palette. Segurel et al. (2020) notes the -13910*T Lactase persistence mutation, found in present-day South Asia, first appeared approximately 3,960 BCE, in Ukraine, and spread between 2,000 and 1,500 BCE throughout Eurasia. Earlier Tandon et al. (1981) had studied the distribution of lactase toleration in North and South Indians. Romero et al.(2011) later plotting a decreasing North West to South East Indian cline for the mutations frequency . ==== Additional components ==== ArunKumar et al. (2015) discern three major ancestry components, which they call "Southwest Asian", "Southeast Asian" and "Northeast Asian". The Southwest Asian component seems to be a native Indian component, while the Southeast Asian component is related to East Asian populations. Brahmin<sup>[''needs context'']</sup> populations "contained 11.4 and 10.6% of Northern Eurasian and Mediterranean components, thereby suggesting a shared ancestry with the Europeans". They note that this fits with earlier studies which "suggested similar shared ancestries with Europeans and Mediterraneans". They further note that<blockquote>Studies based on uni-parental marker have shown diverse Y-chromosomal haplogroups making up the Indian gene pool. Many of these Y-chromosomal markers show a strong correlation to the linguistic affiliation of the population. The genome-wide variation of the Indian samples in the present study correlated with the linguistic affiliation of the sample.</blockquote>They conclude that, while there may have been an ancient settlement in the subcontinent, "male-dominated genetic elements shap[ed] the Indian gene pool", and that these elements "have earlier been correlated to various languages", and further note "the fluidity of female gene pools when in a patriarchal and patrilocal society, such as that of India". Basu et al. (2016) extend the study of Reich et al. (2009) by postulating two other populations in addition to the ANI and ASI: "Ancestral Austro-Asiatic" (AAA) and "Ancestral Tibeto-Burman" (ATB), corresponding to the Austroasiatic and Tibeto-Burman language speakers. According to them, ancestral populations seem to have occupied geographically separated habitats. The ASI and the AAA were early<sup>[''when?'']</sup> settlers, who possibly arrived via the southern wave out of Africa. The ANI are related to Central South Asians and entered India through the northwest, while the ATB are related to East Asians and entered India through northeast corridors. They further note that<blockquote>The asymmetry of admixture, with ANI populations providing genomic inputs to tribal populations (AA, Dravidian tribe, and TB) but not vice versa, is consistent with elite dominance and patriarchy. Males from dominant populations, possibly upper castes, with high ANI component, mated outside of their caste, but their offspring were not allowed to be inducted into the caste. This phenomenon has been previously observed as asymmetry in homogeneity of mtDNA and heterogeneity of Y-chromosomal haplotypes in tribal populations of India as well as the African Americans in United States.</blockquote> ==== Male-mediated migration ==== Reich et al. (2009), citing Kivisild et al. (1999), indicate that there has been a low influx of female genetic material since 50,000 years ago, but a "male gene flow from groups with more ANI relatedness into ones with less". ArunKumar et al. (2015) "suggest that ancient male-mediated migratory events and settlement in various regional niches led to the present day scenario and peopling of India." Mahl (2021), in a study of the Brahmin ethnic group, identified the ancient male protagonists of the sampled population could be traced to twelve geographic locations, eleven of which were outside South Asia. Of the Y-DNA haplogroups identified, four were carried by ~83% of those sampled, and of these four, two were of Central Asian origin and one of the Fertile Crescent. All sampled groups were admixed with populations of South Asian origin. === North-south cline === According to Metspalu et al. (2011) there is "a general principal component cline stretching from Europe to south India". This northwest component is shared with populations from the Middle East, Europe and Central Asia, and is thought to represent at least one ancient influx of people from the northwest.<sup>[''clarification needed'']</sup> According to Saraswathy et al. (2010), there is "a major genetic contribution from Eurasia to North Indian upper castes" and a "greater genetic inflow among North Indian caste populations than is observed among South Indian caste and tribal populations". According to Basu et al. (2003) and Saraswathy et al. (2010) certain sample populations of upper caste North Indians show a stronger affinity to Central Asian caucasians, whereas southern Indian Brahmins show a less stronger affinity. === Scenarios === While Reich notes that the onset of admixture coincides with the arrival of Indo-European language, according to Metspalu (2011), the commonalities of the ANI with European genes cannot be explained by the influx of Indo-Aryans at ca. 3,500 BP alone. They state that the split of ASI and ANI predates the Indo-Aryan migration, both of these ancestry components being older than 3,500 BP." Moorjani (2013) states that "We have further shown that groups with unmixed ANI and ASI ancestry were plausibly living in India until this time." Moorjani (2013) describes three scenarios regarding the bringing together of the two groups: # "migrations that occurred prior to the development of agriculture [8,000–9,000 years before present (BP)]. Evidence for this comes from mitochondrial DNA studies, which have shown that the mitochondrial haplogroups (hg U2, U7, and W) that are most closely shared between Indians and West Eurasians diverged about 30,000–40,000 years BP." # "Western Asian peoples migrated to India along with the spread of agriculture [...] Any such agriculture related migrations would probably have begun at least 8,000–9,000 years BP (based on the dates for Mehrgarh) and may have continued into the period of the Indus civilization that began around 4,600 years BP and depended upon West Asian crops." # "migrations from Western or Central Asia from 3,000 to 4,000 years BP, a time during which it is likely that Indo-European languages began to be spoken in the subcontinent. A difficulty with this theory, however, is that by this time India was a densely populated region with widespread agriculture, so the number of migrants of West Eurasian ancestry must have been extraordinarily large to explain the fact that today about half the ancestry in India derives from the ANI." ==== Pre-agricultural migrations ==== See also: Peopling of India Metspalu et al. (2011) detected a genetic component in India, k5, which "distributed across the Indus Valley, Central Asia, and the Caucasus". According to Metspalu et al. (2011), k5 "might represent the genetic vestige of the ANI", though they also note that the geographic cline of this component within India "is very weak, which is unexpected under the ASI-ANI model", explaining that the ASI-ANI model implies an ANI contribution which decreases toward southern India. According to Metspalu et al. (2011), "regardless of where this component was from (the Caucasus, Near East, Indus Valley, or Central Asia), its spread to other regions must have occurred well before our detection limits at 12,500 years." Speaking to Fountain Ink, Metspalu said, "the West Eurasian component in Indians appears to come from a population that diverged genetically from people actually living in Eurasia, and this separation happened at least 12,500 years ago." Moorjani et al. (2013) refer to Metspalu (2011) as "fail[ing] to find any evidence for shared ancestry between the ANI and groups in West Eurasia within the past 12,500 years". CCMB researcher Thangaraj believes that "it was much longer ago", and that "the ANI came to India in a second wave of migration that happened perhaps 40,000 years ago." Narasimhan et al. (2019) conclude that ANI and ASI were formed in the 2nd millennium BCE. They were preceded by IVC-people, a mixture of AASI (ancient ancestral south Indians, that is, hunter-gatherers related), and people related to but distinct from Iranian agri-culturalists, lacking the Anatolian farmer-related ancestry which was common in Iranian farmers after 6000 BCE. Those Iranian farmers-related people may have arrived in India before the advent of farming in northern India, and mixed with people related to Indian hunter-gatherers ca. 5400 to 3700 BCE, before the advent of the mature IVC. This mixed IVC-population, which probably was native to the Indus Valley Civilisation, "contributed in large proportions to both the ANI and ASI", which took shape during the 2nd millennium BCE. ANI formed out of a mixture of "''Indus_Periphery''-related groups" and migrants from the steppe, while ASI was formed out of "''Indus_Periphery''-related groups" who moved south and mixed with hunter-gatherers. ==== Agricultural migrations ==== ===== Near-Eastern migrations ===== See also: Neolithic Revolution, Fertile Crescent, and Dravidian languages § Prehistory Kivisild et al. (1999) note that "a small fraction of the 'Caucasoid-specific' mtDNA lineages found in Indian populations can be ascribed to a relatively recent admixture." at ca. 9,300 ± 3,000 years before present, which coincides with "the arrival to India of cereals domesticated in the fertile Crescent" and "lends credence to the suggested linguistic connection between Elamite and Dravidic populations". According to Gallego Romero et al. (2011), their research on lactose tolerance in India suggests that "the west Eurasian genetic contribution identified by Reich et al. (2009) principally reflects gene flow from Iran and the Middle East." Gallego Romero notes that Indians who are lactose-tolerant show a genetic pattern regarding this tolerance which is "characteristic of the common European mutation". According to Gallego Romero, this suggests that "the most common lactose tolerance mutation made a two-way migration out of the Middle East less than 10,000 years ago. While the mutation spread across Europe, another explorer must have brought the mutation eastward to India – likely traveling along the coast of the Persian Gulf where other pockets of the same mutation have been found." In contrast, Allentoft et al. (2015) found that lactose-tolerance was absent in the Yamnaya culture, noting that while "the Yamnaya and these other Bronze Age cultures herded cattle, goats, and sheep, they couldn't digest raw milk as adults. Lactose tolerance was still rare among Europeans and Asians at the end of the Bronze Age, just 2000 years ago." According to Lazaridis et al. (2016), "farmers related to those from Iran spread northward into the Eurasian steppe; and people related to both the early farmers of Iran and to the pastoralists of the Eurasian steppe spread eastward into South Asia." They further note that ANI "can be modelled as a mix of ancestry related to both early farmers of western Iran and to people of the Bronze Age Eurasian steppe". ===== Haplogroup R1a and related haplogroups ===== Main article: Haplogroup R1a The distribution and proposed origin of haplogroup R1a, more specifically R1a1a1b, is often being used as an argument pro or contra the Indo-Aryan migrations. It is found in high frequencies in Eastern Europe (Z282) and south Asia (Z93), the areas of the Indo-European migrations. The place of origin of this haplogroup may give an indication of the "homeland" of the Indo-Europeans, and the direction of the first migrations. Cordeaux et al. (2004), based on the spread of a cluster of haplogroups (J2, R1a, R2, and L) in India, with higher rates in northern India, argue that agriculture in south India spread with migrating agriculturalists, which also influenced the genepool in south India. Sahoo et al. (2006), in response to Cordeaux et al. (2004), suggest that those haplogroups originated in India, based on the spread of these various haplogroups in India. According to Sahoo et al. (2006), this spread "argue[s] against any major influx, from regions north and west of India, of people associated either with the development of agriculture or the spread of the Indo-Aryan language family". They further propose that "the high incidence of R1* and R1a throughout Central Asian and East European populations (without R2 and R* in most cases) is more parsimoniously explained by gene flow in the opposite direction", which according to Sahoo et al. (2006) explains the "sharing of some Y-chromosomal haplogroups between Indian and Central Asian populations". Sengupta et al. (2006) also comment on Cordeaux et al. (2004), stating that "the influence of Central Asia on the pre-existing gene pool was minor", and arguing for "a peninsular origin of Dravidian speakers than a source with proximity to the Indus and with significant genetic input resulting from demic diffusion associated with agriculture". Sharma et al. (2009) found a high frequency of R1a1 in India. They therefore argue for an Indian origin of R1a1, and dispute "the origin of Indian higher most castes from Central Asian and Eurasian regions, supporting their origin within the Indian subcontinent". Underhill et al. (2014/2015) conclude that R1a1a1, the most frequent subclade of R1a, split into Z282 (Europe) and Z93 (Asia) at circe 5,800 before present. According to Underhill et al. (2014/2015), "[t]his suggests the possibility that R1a lineages accompanied demic expansions initiated during the Copper, Bronze, and Iron ages." They further note that the diversification of Z93 and the "early urbanization within the Indus Valley also occurred at this time and the geographic distribution of R1a-M780 (Figure 3d) may reflect this". Palanichamy et al. (2015), while responding to Cordeaux et al. (2004), Sahoo et al. (2006) and Sengupta et al. (2006), elaborated on Kivisild et al.'s (1999) suggestion that West Eurasian haplogroups "may have been spread by the early Neolithic migrations of proto-Dravidian farmers spreading from the eastern horn of the Fertile Crescent into India". They conclude that "the L1a lineage arrived from western Asia during the Neolithic period and perhaps was associated with the spread of the Dravidian language to India", indicating that "the Dravidian language originated outside India and may have been introduced by pastoralists coming from western Asia (Iran)." They further conclude that two subhalogroups originated with the Dravidian speaking peoples, and may have come to South India when the Dravidian language spread. Poznik et al. (2016) note that "striking expansions" occurred within R1a-Z93 at ~4,500–4,000 years ago, which "predates by a few centuries the collapse of the Indus Valley Civilisation". Mascarenhas et al. (2015) note that the expansion of Z93 from Transcaucasia into South Asia is compatible with "the archeological records of eastward expansion of West Asian populations in the 4th millennium BCE culminating in the so-called Kura-Araxes migrations in the post-Uruk IV period". ==== Indo-European migrations ==== ===== Genetic impact of Indo-Aryan migrations ===== Bamshad et al. (2001), Wells et al. (2002) and Basu et al. (2003) argue for an influx of Indo-European migrants into the Indian subcontinent, but not necessarily an "invasion of any kind". Bamshad et al. (2001) notice that the correlation between caste-status and West Eurasian DNA may be explained by subsequent male immigration into the Indian subcontinent. Basu et al. (2003) argue that the Indian subcontinent was subjected to a series of Indo-European migrations about 1500 BCE. Metspalu et al. (2011) note that "any nonmarginal migration from Central Asia to South Asia should have also introduced readily apparent signals of East Asian ancestry into India" (although this presupposes the unproven assumption that East Asian ancestry was present – to a significant extent – in prehistorical Central Asia), which is not the case, and conclude that if there was a major migration of Eurasians into India, this happened before the rise of the Yamna culture. Based on Metspalu (2011), Lalji Singh, a co-author of Metspalu, concludes that "[t]here is no genetic evidence that Indo-Aryans invaded or migrated to India". Moorjani et al. (2013) notes that the period of 4,200–1,900 years BP was a time of dramatic changes in northern India, and coincides with the "likely first appearance of Indo-European languages and Vedic religion in the subcontinent". Moorjani further notes that there must have been multiple waves of admixture, which had more impact on higher-caste and northern Indians and took place more recently. This may be explained by "additional gene flow", related to the spread of languages:<blockquote>...at least some of the history of population mixture in India is related to the spread of languages in the subcontinent. One possible explanation for the generally younger dates in northern Indians is that after an original mixture event of ANI and ASI that contributed to all present-day Indians, some northern groups received additional gene flow from groups with high proportions of West Eurasian ancestry, bringing down their average mixture date.</blockquote>Palanichamy et al. (2015), elaborating on Kivisild et al. (1999) conclude that "A large proportion of the west Eurasian mtDNA haplogroups observed among the higher-ranked caste groups, their phylogenetic affinity and age estimate indicate recent Indo-Aryan migration to India from west Asia. According to Palanichamy et al. (2015), "the west Eurasian admixture was restricted to caste rank. It is likely that Indo-Aryan migration has influenced the social stratification in the pre-existing populations and helped in building the Hindu caste system, but it should not be inferred that the contemporary Indian caste groups have directly descended from Indo-Aryan immigrants. Jones et al. (2015) state that Caucasus hunter gatherer(CHG) was "a major contributor to the Ancestral North Indian component". According to Jones et al. (2015), it "may be linked with the spread of Indo-European languages", but they also note that "earlier movements associated with other developments such as that of cereal farming and herding are also plausible". Basu et al. (2016) note that the ANI are inseparable from Central-South Asian populations in present-day Pakistan. They hypothesise that "the root of ANI is in Central Asia". According to Lazaridis et al. (2016) ANI "can be modelled as a mix of ancestry related to both early farmers of western Iran and to people of the Bronze Age Eurasian steppe". Silva et al. (2017) state that "the recently refined Y-chromosome tree strongly suggests that R1a is indeed a highly plausible marker for the long-contested Bronze Age spread of Indo-Aryan speakers into South Asia." Silva et al. (2017) further notes "they likely spread from a single Central Asian source pool, there do seem to be at least three and probably more R1a founder clades within the Subcontinent, consistent with multiple waves of arrival." Narasimhan et al. (2018) conclude that pastoralists spread southwards from the Eurasian steppe during the period 2300–1500 BCE. These pastoralists during the 2nd millennium BCE, who were likely associated with Indo-European languages, presumably mixed with the descendants of the Indus Valley Civilisation, who in turn were a mix of Iranian agriculturalists and South Asian hunter-gatherers forming "the single most important source of ancestry in South Asia." Zerjal et al. (2002) argue that "multiple recent events" may have reshaped India's genetic landscape. ==== Origins of R1a-Z93 ==== Ornella Semino et al. (2000) proposed Ukrainian origins of R1a1, and a postglacial spread of the R1a1 gene during the Late Glacial, subsequently magnified by the expansion of the Kurgan culture into Europe and eastward. Spencer Wells proposes central Asian origins, suggesting that the distribution and age of R1a1 points to an ancient migration corresponding to the spread by the Kurgan people in their expansion from the Eurasian Steppe. According to Pamjav et al. (2012), "Inner and Central Asia is an overlap zone for the R1a1-Z280 and R1a1-Z93 lineages [which] implies that an early differentiation zone of R1a1-M198 conceivably occurred somewhere within the Eurasian Steppes or the Middle East and Caucasus region as they lie between South Asia and Eastern Europe." A 2014 study by Peter A. Underhill et al., using 16,244 individuals from over 126 populations from across Eurasia, concluded that there was compelling evidence that "the initial episodes of haplogroup R1a diversification likely occurred in the vicinity of present-day Iran." According to Martin P. Richards, co-author of Silva et al. (2017), "[the prevalence of R1a in India was] very powerful evidence for a substantial Bronze Age migration from central Asia that most likely brought Indo-European speakers to India." == Literary research: similarities, geography, and references to migration == === Similarities === ==== Mitanni ==== See also: Indo-Aryan superstrate in Mitanni The oldest inscriptions in Old Indic, the language of the Rig Veda, is found not in India, but in northern Syria in Hittite records regarding one of their neighbors, the Hurrian-speaking Mitanni. In a treaty with the Hittites, the king of Mitanni, after swearing by a series of Hurrian gods, swears by the gods Mitrašil, Uruvanaššil, Indara, and Našatianna, who correspond to the Vedic gods Mitra, Varuna, Indra, and Nāsatya (Aśvin). Contemporary<sup>[''when?'']</sup> equestrian terminology, as recorded in a horse-training manual whose author is identified as "Kikkuli", contains Indo-Aryan loanwords. The personal names and gods of the Mitanni aristocracy also bear significant traces of Indo-Aryan. Because of the association of Indo-Aryan with horsemanship and the Mitanni aristocracy, it is presumed that, after superimposing themselves as rulers on a native Hurrian-speaking population about the 15th–16th centuries BCE, Indo-Aryan charioteers were absorbed into the local population and adopted the Hurrian language. Brentjes argues that there is not a single cultural element of central Asian, Eastern European, or Caucasian origin in the Mitannian area; he also associates with an Indo-Aryan presence the peacock motif found in the Middle East from before 1600 BCE and quite likely from before 2100 BCE. Scholars reject the possibility that the Indo-Aryans of Mitanni came from the Indian subcontinent as well as the possibility that the Indo-Aryans of the Indian subcontinent came from the territory of Mitanni, leaving migration from the north the only likely scenario. The presence of some Bactria-Margiana loan words in Mitanni, Old Iranian and Vedic further strengthens this scenario. ==== Iranian Avesta ==== The religious practices depicted in the ''Rigveda'' and those depicted in the ''Avesta'', the central religious text of Zoroastrianism—the ancient Iranian faith founded by the prophet Zoroaster—have in common the deity Mitra, priests called ''hotṛ'' in the ''Rigveda'' and ''zaotar'' in the ''Avesta'', and the use of a ritual substance that the ''Rigveda'' calls ''soma'' and the ''Avesta'' ''haoma''. However, the Indo-Aryan ''deva'' 'god' is cognate with the Iranian ''daēva'' 'demon'. Similarly, the Indo-Aryan ''asura'' 'name of a particular group of gods' (later on, 'demon') is cognate with the Iranian ''ahura'' 'lord, god,' which 19th and early 20th century authors such as Burrow explained as a reflection of religious rivalry between Indo-Aryans and Iranians. Linguists such as Burrow argue that the strong similarity between the Avestan of the ''Gāthās''—the oldest part of the ''Avesta''—and the Vedic Sanskrit of the ''Rigveda'' pushes the dating of Zarathustra or at least the ''Gathas'' closer to the conventional ''Rigveda'' dating of 1500–1200 BCE, i.e. 1100 BCE, possibly earlier. Boyce concurs with a lower date of 1100 BCE and tentatively proposes an upper date of 1500 BCE. Gnoli dates the ''Gathas'' to around 1000 BCE, as does Mallory (1989), with the caveat of a 400-year leeway on either side, i.e. between 1400 and 600 BCE. Therefore, the date of the Avesta could also indicate the date of the Rigveda. There is mention in the ''Avesta'' of ''Airyan Vaejah'', one of the '16 the lands of the Aryans'. Gnoli's interpretation of geographic references in the ''Avesta'' situates the ''Airyanem Vaejah'' in the Hindu Kush. For similar reasons, Boyce excludes places north of the Syr Darya and western Iranian places. With some reservations, Skjaervo concurs that the evidence of the Avestan texts makes it impossible to avoid the conclusion that they were composed somewhere in northeastern Iran. Witzel points to the central Afghan highlands. Humbach derives Vaējah from cognates of the Vedic root "vij", suggesting the region of fast-flowing rivers. Gnoli considers Choresmia (Xvairizem), the lower Oxus region, south of the Aral Sea to be an outlying area in the Avestan world. However, according to Mallory & Mair (2000), the probable homeland of Avestan is, in fact, the area south of the Aral Sea. === Geographical location of Rigvedic rivers === Main articles: Sarasvati River and Samudra The geography of the Rigveda seems to be centered on the land of the seven rivers. While the geography of the Rigvedic rivers is unclear in some of the early books of the Rigveda, the Nadistuti sukta is an important source for the geography of late Rigvedic society. The Sarasvati River is one of the chief Rigvedic rivers. The Nadistuti sukta in the Rigveda mentions the Sarasvati between the Yamuna in the east and the Sutlej in the west, and later texts like the Brahmanas and Mahabharata mention that the Sarasvati dried up in a desert. Scholars agree that at least some of the references to the Sarasvati in the Rigveda refer to the Ghaggar-Hakra River, while the Afghan river Haraxvaiti/Harauvati Helmand is sometimes quoted as the locus of the early Rigvedic river. Whether such a transfer of the name has taken place from the Helmand to the Ghaggar-Hakra is a matter of dispute. Identification of the early Rigvedic Sarasvati with the Ghaggar-Hakra before its assumed drying up early in the second millennium would place the Rigveda BCE, well outside the range commonly assumed by Indo-Aryan migration theory. A non-Indo-Aryan substratum in the river-names and place-names of the Rigvedic homeland would support an external origin of the Indo-Aryans.<sup>[''citation needed'']</sup> However, most place-names in the Rigveda and the vast majority of the river-names in the north-west of the Indian subcontinent are Indo-Aryan. Non-Indo-Aryan names are, however, frequent in the Ghaggar and Kabul River areas, the first being a post-Harappan stronghold of Indus populations.<sup>[''citation needed'']</sup> === Textual references to migrations === ==== Rigveda ==== Just as the Avesta does not mention an external homeland of the Zoroastrians, the Rigveda does not explicitly refer to an external homeland or to a migration. Later Hindu texts, such as the Brahmanas, Mahabharata, Ramayana, and Puranas, are centered in the Ganges region (rather than Haryana and Punjab) and mention regions still further to the south and east, suggesting a later movement or expansion of the Vedic religion and culture to the east. There is no clear indication of general movement in either direction in the Rigveda itself; searching for indirect references in the text, or by correlating geographic references with the proposed order of composition of its hymns, has not led to any consensus on the issue.<sup>[''citation needed'']</sup> ==== Srauta Sutra of Baudhayana ==== According to Romila Thapar, the ''Srauta Sutra of Baudhayana'' "refers to the Parasus and the arattas who stayed behind and others who moved eastwards to the middle Ganges valley and the places equivalent such as the Kasi, the Videhas and the Kuru Pancalas, and so on. In fact, when one looks for them, there are evidence for migration." ==== Later Vedic and Hindu texts ==== Texts like the Puranas and Mahabharata belong to a much later period than the Rigveda, making their evidence less than sufficient to be used for or against the Indo-Aryan migration theory.<sup>[''original research?'']</sup> Later Vedic texts show a shift<sup>[''citation needed'']</sup> of location from the Punjab to the East. According to the Yajurveda, Yajnavalkya (a Vedic ritualist and philosopher) lived in the eastern region of Mithila. Aitareya Brahmana 33.6.1. records that Vishvamitra's sons migrated to the north, and in Shatapatha Brahmana 1:2:4:10 the Asuras were driven to the north. In much later texts, Manu was said to be a king from Dravida. In the legend of the flood he stranded with his ship in Northwestern India or the Himalayas. The Vedic lands (e.g. Aryavarta, Brahmavarta) are located in Northern India or at the Sarasvati and Drishadvati river. However, in a post-Vedic text the Mahabharata Udyoga Parva (108), the East is described as the homeland of the Vedic culture, where "the divine Creator of the universe first sang the Vedas". The legends of Ikshvaku, Sumati and other Hindu legends may have their origin in Southeast Asia. The Puranas record that Yayati left Prayag (confluence of the Ganges & Yamuna) and conquered the region of Sapta Sindhu. His five sons Yadu, Druhyus, Puru, Anu and Turvashu correspond to the main tribes of the Rigveda. The Puranas also record that the Druhyus were driven out of the land of the seven rivers by Mandhatr and that their next king Gandhara settled in a north-western region which became known as Gandhara. The sons of the later Druhyu king Prachetas are supposed by some to have 'migrated' to the region north of Afghanistan though the Puranic texts only speak of an "adjacent" settlement. == Ecology == See also: Bond event, 5.9 kiloyear event, and 4.2-kiloyear event Climate change and drought may have triggered both the initial dispersal of Indo-European speakers, and the migration of Indo-Europeans from the steppes in south-central Asia and India. Around 4200–4100 BCE a climate change occurred, manifesting in colder winters in Europe. Between 4200 and 3900 BCE many tell settlements in the lower Danube Valley were burned and abandoned, while the Cucuteni-Tripolye culture showed an increase in fortifications, meanwhile moving eastwards towards the Dniepr. Steppe herders, archaic Proto-Indo-European speakers, spread into the lower Danube valley about 4200–4000 BCE, either causing or taking advantage of the collapse of Old Europe. The Yamna horizon was an adaptation to a climate change which occurred between 3500 and 3000 BCE, in which the steppes became drier and cooler. Herds needed to be moved frequently to feed them sufficiently, and the use of wagons and horse-back riding made this possible, leading to "a new, more mobile form of pastoralism". It was accompanied by new social rules and institutions, to regulate the local migrations in the steppes, creating a new social awareness of a distinct culture, and of "cultural Others" who did not participate in these new institutions. In the second century BCE widespread aridization led to water shortages and ecological changes in both the Eurasian steppes and south Asia. At the steppes, humidization led to a change of vegetation, triggering "higher mobility and transition to the nomadic cattle breeding". Water shortage also had a strong impact in south Asia:<blockquote>This time was one of great upheaval for ecological reasons. Prolonged failure of rains caused acute water shortage in a large area, causing the collapse of sedentary urban cultures in south-central Asia, Afghanistan, Iran, and India, and triggering large-scale migrations. Inevitably, the new arrivals came to merge with and dominate the post-urban cultures.</blockquote>The Indus Valley civilisation was localised, that is, urban centers disappeared and were replaced by local cultures, due to a climatic change that is also signalled for the neighbouring areas of the Middle East. As of 2016 many scholars believe that drought and a decline in trade with Egypt and Mesopotamia caused the collapse of the Indus Civilisation. The Ghaggar-Hakra system was rain-fed, and water-supply depended on the monsoons. The Indus valley climate grew significantly cooler and drier from about 1800 BCE, linked to a general weakening of the monsoon at that time. The Indian monsoon declined and aridity increased, with the Ghaggar-Hakra retracting its reach towards the foothills of the Himalaya, leading to erratic and less extensive floods that made inundation agriculture less sustainable. Aridification reduced the water supply enough to cause the civilisation's demise, and to scatter its population eastward. == Indigenous Aryanism == Main article: Indigenous Aryanism Indian nationalistic opponents of the Indo-Aryan migration question it, and instead promote Indigenous Aryanism, claiming that speakers of Indo-Iranian languages (sometimes called ''Aryan languages'') are "indigenous" to the Indian subcontinent. Indigenous Aryanism has no support in contemporary mainstream scholarship, as it is contradicted by a broad range of research on Indo-European migrations. [[Category:Indian History]] 9e53e827b72327db093fc9cd8363317c4312d16d Timeline of Indian history 0 23 1360 29 2024-03-17T16:44:44Z 80.5.18.102 0 wikitext text/x-wiki This is a '''timeline of Indian history''', comprising important legal and territorial changes and political events in India and its predecessor states. To read about the background to these events, see History of India. also see the list of governors-general of India, list of prime ministers of India and Years in India. == Pre-historic India == === Pre-90th century BC === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |4,000,000 – 100,000 BCE |- | |Tools crafted by proto-humans that have been dated back two million years have been discovered in the northwestern subcontinent. The earliest archaeological site in the subcontinent is the palaeolithic hominid site in the Soan River valley. Soanian sites are found in the Sivalik region across what are now [[India]], [[Pakistan]], and [[Nepal]]. Some of the Bhimbetka rock shelters were inhabited by ''Homo erectus'' more than 100,000 years ago. Madrasian culture sites have been found in Attirampakkam (Attrambakkam=13° 13' 50", 79° 53' 20"), which is located near Chennai (formerly known as Madras), Tamil Nadu. Thereafter, tools related to this culture have been found at various other locations in this region. Bifacial handaxes and cleavers are typical assemblages recovered of this culture. Flake tools, microliths and other chopping tools have also been found. Most of these tools were composed of the metamorphic rock quartzite. The stone tool artifacts in this assemblage have been identified as a part of the second inter-pluvial period in India. Evidence for presence of Hominins with Acheulean technology 150,000–100,000 BCE in Tamil Nadu. Technology similar to contemporary artifacts found used by Homo sapiens in Africa found in Jwalapuram around 74000 BCE. Paleolithic industries in South India Tamil Nadu 30,000 BCE |} === 90th–50th century BCE === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |9,000 BCE |- | |Early Neolithic culture with first confirmed semi-permanent settlements appeared 11000 years ago in the Bhimbetka rock shelters in modern Madhya Pradesh, India. Some of the Stone Age rock paintings found among the Bhimbetka rock shelters are approximately 30,000 years old. The ancient history of the region includes some of Indian subcontinent's oldest settlements and some of its major civilisations. |} == Bronze Age India == Main article: Bronze Age India === 50th–40th century BCE === {| class="wikitable" !Year !Date !Event |- |4000 BCE | |Phase of the [[Indus Valley Civilisation]] begins. The civilization used an early form of the Indus signs, now called Indus script. Over the course of the next 1000–1500 years, inhabitants of the Civilization developed new techniques in handicraft (carnelian products, seal carving) and metallurgy (copper, bronze, lead, and tin) had elaborate urban planning, baked brick houses, efficient drainage systems, water supply systems, and clusters of large non-residential buildings. The civilization depended significantly on trade, was the first civilization to use wheeled transport in the form of bullock carts, and also used boats. |} === 30th century BCE-20th century BCE === {| class="wikitable" !Year !Date !Event |- |2800 BCE | |The Indus Valley Civilization expand across the whole of modern-day Pakistan, much of northern India, and large parts of Afghanistan, with Harappa and Mohenjo-daro becoming large metropolises. |- |2600 BCE | |End of the Early Indus Valley Civilization culture. Start of Mature Indus Valley Civilization culture | |} === 19th century BCE === {| class="wikitable" !Year !Date !Event |- |1900 BCE | |End of Mature Indus Valley Civilization culture, late Indus Valley Civilization period starts |} === 18th century BCE === {| class="wikitable" !Year !Date !Event |- |1800 BCE | |Adichanallur urn-burial site in Tirunelveli district in [[Tamil Nadu]]. In 2004, a number of skeletons dating from around 3,800 years ago. |} == Iron Age India == Main article: Iron Age in India === 17th century BCE === {| class="wikitable" !Year !Date !Event |- |1700 BCE | |Brihadratha also known as ''Maharatha'', was the initiator of the Brihadratha dynasty, the earliest ruling dynasty of Magadha. |- | | |Jarasandha was the son of Brihadratha and became the 2nd ruler of the ''Barhadratha'' dynasty of Magadha succeeding his father |- | | |Sahadeva of Magadha became the 3rd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Jarasandha |- |1661 BCE | |Somadhi became the 4th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sahadeva of Magadha |- |1603 BCE | |Srutasravas became the 5th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Somadhi |} === 16th century BCE === {| class="wikitable" !Year !Date !Event |- |1539 BCE | |Ayutayus became the 6th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Srutasravas |- |1503 BCE | |Niramitra became the 7th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Ayutayus |} === 15th century BCE === {| class="wikitable" !Year !Date !Event |- |1500 BCE | |Early Vedic period (to 1000 BCE) |- |1463 BCE | |Sukshatra became the 8th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Niramitra |- |1405 BCE | |Brihatkarman became the 9th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sukshatra |} === 14th century BCE === {| class="wikitable" !Year !Date !Event |- |1400 BCE | |Gopala Dynasty established by Gopa |- |1382 BCE | |Senajit became the 10th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Brihatkarman |- |1332 BCE | |Srutanjaya became the 11th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Senajit |} === 13th century BCE === {| class="wikitable" !Year !Date !Event |- |1300 BCE | |Cemetery H culture comes to an end |- |1300 BCE | |End of late Indus Valley Civilization period |- |1292 BCE | |Vipra became the 12th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Srutanjaya |- |1280 BCE | |Pundravardhana Kingdom was established sometime before 1280 BCE. |- |1257 BCE | |Suchi became the 13th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Vipra |} === 12th century BCE === {| class="wikitable" !Year !Date !Event |- |1200 BCE | |Rigveda Codified. [[Kuru Kingdom]] Established. |- |1199 BCE | |Kshemya became the 14th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Suchi |- |1171 BCE | |Subrata became the 15th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Kshemya |- |1107 BCE | |Dharma became the 16th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Subrata |} === 11th century BCE === {| class="wikitable" !Year !Date !Event |- |1043 BCE | |Dharma stepped down as the 16th ruler of the ''Barhadratha'' dynasty of Magadha. |- |1008 BCE | |Susuma became the 17th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Dharma |} === 10th century BCE === {| class="wikitable" !Year !Date !Event |- |1000 BCE | |Middle and Late Vedic period (to 500 BCE) |- |1000 – 300 BCE | |Kanchi district, gold mine of Megalithic sites in Tamil Nadu, South India |- |1000- 900 BCE | |Kingdom of Videha was established. |- |1000- 900 BCE | |Panchala Kingdom was established. |- |970 BCE | |Dridhasena became the 18th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Susuma |- |912 BCE | |Sumati became the 19th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Dridhasena |} === 9th century BCE === {| class="wikitable" !Year !Date !Event |- |879 BCE | |Subala became the 20th ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sumati |- |877 BCE | |Birth of [[Parsvanatha]], 23rd Jain Tirthankara (traditional date) |- |857 BCE | |Sunita became the 21st ruler of the ''Barhadratha'' dynasty of Magadha succeeding Subala |- |841 BCE | |Gopala Dynasty was de-established. |- |817 BCE | |[[Satyajit]] became the 22nd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Sunita |} === 8th century BCE === {| class="wikitable" !Year !Date !Event |- |767 BCE | |[[Viswajit]] became the 23rd ruler of the ''Barhadratha'' dynasty of Magadha succeeding Satyajit |- |732 BCE | |[[Ripunjaya]] became the 24th and the last ruler of the ''Barhadratha'' dynasty of Magadha succeeding Viswajit. |} === 7th century BCE === {| class="wikitable" !Year !Date !Event |- |700 BCE | |The [[Upanishads]], a sacred text of Hinduism, are written. |- |700 BCE | |Kingdom of Kosala was established. Kosala belonged to the Northern Black Polished Ware culture (c. 700–300 BCE). |} === 6th century BCE === {| class="wikitable" !Year !Date !Event |- | rowspan="4" |600 BCE | |Sixteen Maha Janapadas ("''Great Realms''" or "''Great Kingdoms''") emerge. |- | |The Vedic period ends. |- | |The Chola, Pandya, and Chera dynasties are established. |- | |The capital of the Early Pandyan Kingdom was initially Korkai, all around 600 BCE, and was later moved to Koodal (now Madurai) during the reign of Nedunjeliyan I. |- |599 BCE | |[[Mahavira]] of the 24th Tirthankara is born. This turns out to become the most famous wave of Jainism. |- |563 BCE | |[[Siddhārtha Gautama,]] Buddha-to-be, is born in Lumbini into a leading royal family in the republic of the Shakyas, which is now part of Nepal. |- |543 BCE | |The Vanga-based Prince Vijaya (c. 543 BCE) married a daughter of the Pandyan king of Madurai, to whom he was sending rich presents every year. Sinhala chronicle Mahavamsa or the Great Chronicle of Sri Lanka mentions this event<sup>[''citation needed'']</sup> |- |538 BCE | |Cyrus the Great, founder of the Persian Achaemenid Empire reached up to northwestern parts of the Indian subcontinent, today's Afghanistan, which later proved to be his nemesis and caused his death. |- |527 BCE | |Nirvana of Mahavira, |- |525 BCE | |Kuru Kingdom was de-established. |} === 5th century BCE === {| class="wikitable" !Year !Date !Event |- |483 BCE | |Proposed Mahaparinirvana date of Gautama Buddha at Kushinagar. |} === 4th century BCE === {| class="wikitable" !Year !Date !Event |- |400 BCE | |Siddhartha Gautama 'Buddha' of the Shakya polity in S. Nepal, founds Buddhism (older date: 563–483 BCE) |- |350 BCE | |Panini, labelled as the father of linguistics, a resident of Gandhara, describes the grammar and morphology of Sanskrit in the text Ashtadhyayi. Panini's standardized Sanskrit is known as Classical Sanskrit. |- |333 BCE | |Persian rule in the northwest ends after Darius 3 is defeated by Alexander the Great, who establishes the Macedonian Empire after inheriting the Persian Achaemenid Empire. |- | rowspan="2" |326 BCE | |Ambhi king of Takshila surrenders to Alexander. |- | |Porus who ruled parts of the Punjab, fought Alexander at the Battle of the Hydaspes River. |- |321 BCE | |[[Maurya Empire]] is founded by [[Chandragupta Maurya]] in Magadha after he defeats the Nanda dynasty and Macedonian Seleucid Empire. Mauryan capital city is Pataliputra (Modern Patna in Bihar) |- |305 BCE | |Chandragupta Maurya defeats Seleucus Nicator of the Seleucid Empire. |- |304 BCE | |Seleucus gives up his territories in the subcontinent (Afghanistan/Baluchistan) to Chandragupta in exchange for 500 elephants. Seleucus offers his daughter in marriage to Chandragupta to seal their friendship. |} == Classical India == Main article: Middle kingdoms of India === 3rd century BCE === {| class="wikitable" !Year !Date !Event |- |290 BCE-270 BCE | |Pingala, ancient Indian mathematician and poet writes the ''Chandaḥśāstra'' (also called the Pingala-sutras), which presents the first known description of a binary numeral system. |- |273 BCE | |[[Ashoka]] the Great regarded as the greatest ancient Indian emperor, grandson of Chandragupta Maurya, ascends as emperor of the Maurya Empire. |- |266 BCE | |Ashoka conquers and unifies most of Indian subcontinent, along with most of Afghanistan and Balochistan. |- | rowspan="2" |265 BCE | |Kalinga War takes place between Ashoka and the kingdom of Kalinga. |- | |After conquering Kalinga, Ashoka who recently converted into buddhism and made it a quasi-official state religion of the Mouryan Empire, reportedly regrets what he has done and relinquishes violence. |- |261 BCE | |Conquest of Kalinga |- |260 BCE | |Ashoka inscribes the Edicts of Ashoka, written down using Brahmi script. The Edicts describe his Buddhist religious views and his commitment to the welfare of his subjects. |- |232 BCE | |Ashoka dies and is succeeded by Kunala. |- |230 BCE | |Simuka declares independence from Mauryan rule and establishes the Satavahana Empire. |} === 2nd century BCE === {| class="wikitable sortable mw-collapsible" !Year !Date !Event |- | rowspan="3" |200 BCE | |Kuninda Kingdom is established. |- | |Tolkāppiyam describes the grammar and morphology of Tamil; it is the oldest existing Tamil grammar (dates vary between 200 BCE and 100 CE). |- | |Indo-Greek Kingdom (also known as the Yavana Kingdom) is established. It was a Hellenistic-era Greek kingdom covering various parts of Afghanistan and the northwestern regions of the Indian subcontinent (parts of modern-day Pakistan and northwestern India). The kingdom was founded when the Graeco-Bactrian king Demetrius (and later Eucratides) invaded India from Bactria in 200 BCE. During its existence, the kingdom was ruled over by 30 successive kings, with Menander I being the most famous Indo-Greek king. |- |184 BCE | |The Mauryan Empire, declines |- |165/155 BCE | |Menander I becomes the king of the Indo-Greek Kingdom. Menander is noted for having become a patron and convert to Greco-Buddhism and he is widely regarded as the greatest of the Indo-Greek kings. |} === 1st century BCE === {| class="wikitable" !Year !Date !Event |- |100 BCE | |Birth of Charaka, ancient Indian physician who writes the Charaka Samhita, an ancient text that describes theories on human body, etiology, symptomology and therapeutics for a wide range of diseases and is based on the ''Agnivesha Samhitā''. |- |65 BCE | |The Pandyan king sends ambassadors to the Greek and Roman lands. |- |58 BCE | |Beginning of [[Vikram Samvat|Vikram Era]] |- |1 BCE | |Fall of the Indo-Greek Kingdom. |} === 1st century === {| class="wikitable" !Year !Date !Event |- |35 | |Western Satraps formed. |- |52 | |St. Thomas arrives in Muziris (modern-day North Paravur and Kodungalloor in Kerala State, India). |- |68 | |Establishment of the Kushan Empire by Kujula Kadphises. |- |79 | |Gautamiputra Satkarni becomes Satavahana emperor and starts Shalivahana era calendar after defeating Scythian king Maues. |- |100 or after | |Sugar was first produced from sugarcane plants in northern India sometime after the first century. |} === 2nd century === {| class="wikitable" !Year !Date !Event |- |113 | |Vima Kadphises becomes the ruler of the Kushan Empire. He was the Kushan Emperor to first introduce gold coinage, in addition to the existing silver and copper coinage. |- |127 | |Kanishka ascends the throne of the Kushan Empire, succeeding Vima Kadphises. Under his reign, the Kushan Empire reached its zenith. |} === 3rd century === {| class="wikitable" !Year !Date !Event |- |240 | |Sri-Gupta starts the Gupta Empire in Magadha, with its capital in Pataliputra |- |250 | |The Vakataka Dynasty in the Deccan is formed by Vindyashakti. He rules until 275. |- | rowspan="2" |275 | |The Pallava dynasty is established |- | |Pravarasena ascends the throne of the Vakataka Dynasty, expanding his empire. He was the first Vakataka ruler who called himself a ''Samrat,'' or emperor. He is perhaps the only emperor in his dynasty. |} === 4th century === {| class="wikitable" !Year !Date !Event |- |320 | |Chandragupta I ascends the Gupta throne. |- |335 | |Samudragupta ascends the Gupta throne and expands the empire. |- |345 | |Kadamba Kingdom established by Mayurasharma, Banavasi as its capital and they were the first kingdom to use Kannada in administration. |- |380 | |Chandragupta II, Samudragupta's son becomes the Gupta Emperor. |- |390 | |Prabhavatigupta, a Gupta Princess who was the daughter of Chandragputa II, becomes the regent of the Vakataka dynasty after the death of her husband Rudrasena II, effectively ruling the Vakatakas until 410. |} === 5th century === {| class="wikitable" !Year !Date !Event |- |413 | |Kumaragupta I, Adopted the title of Mahendraditya. |- |455 | |Skandagupta, Faced Hunas effectively. |- |467 | |Invasions by the Huna. Pallavas became a major power during the reign of Mahendravarman I (571 – 630 CE) |- |475 | |Harishena takes over the Vakataka Dynasty. He was a great patron of Buddhist Art. The World Heritage monument Ajanta Caves is a surviving example of his works. |- |476 | |Birth of Aryabhata, ancient Indian mathematician and astronomer who goes on to write the Aryabhatiya, a Sanskrit astronomical treatise and the Arya-siddhanta. |} == Medieval India == Main article: Medieval India === 6th century === {| class="wikitable" !Year !Date !Event |- |502 | |Mihirakula becomes the ruler of the Alchon Huns. He was the second and last of the Alchon Huns. He was considered to be an extremely violent and cruel ruler. He destroyed many Buddhist monasteries in his kingdom. |- |528 | |Confederation of Indian rulers Yashodharman, Narasimhagupta and Adityavardhana defeat the Huna emperor Mihirakula in the Battle of Sondani. |- |528–540 | |Yashodharman conquers vast territories from the Hunas and Guptas after the Battle of Sondani, and establishes the short-lived Aulikara Empire |- |554 | |Collapse of Gupta Empire after the death of Vishnugupta. |- |573 | |Varāhamihira, ancient Indian astrologer, astronomer, and polymath writes the Pañcasiddhāntikā, a treatise on mathematical astronomy which summarises five earlier astronomical treatises by five authors. |} === 7th century === {| class="wikitable" !Year !Date !Event |- |606 | |Harshavardhana crowned Monarch. |- |628 | |Ancient Indian mathematician and astronomer Brahmagupta completes the Brāhmasphuṭasiddhānta, a text on mathematical astronomy explaining the role of zero, rules for manipulating both negative and positive numbers, a method for computing square roots, methods of solving linear and quadratic equations, and rules for summing series, Brahmagupta's identity, and Brahmagupta's theorem. Brahmagupta also first describes gravity as an attractive force, and uses the term "gurutvākarṣaṇam (गुरुत्वाकर्षणम्)]" in Sanskrit to describe it. |- |637 | |Badami Chalukya power at its peak. Pulakeshin II pushes north up to the Narmada and defeats the invading Harshavardhana of Kanauj |- |647 | |Death of Harshavardhana |- |665 | |Ancient Indian mathematician and astronomer Brahmagupta completes the astronomical treatise Khandakhadyaka covering topics such as the longitudes of the planets, diurnal rotation, lunar and solar eclipses, risings and settings, the moon's crescent and conjunctions of the planets. |} === 8th century === {| class="wikitable" !Year !Date !Event |- |700 | |According to the Qissa-i Sanjan, the immigrants Parsi are granted permission to stay by the local ruler Jadi Rana |- |711 | |Arab commander of the Umayyad Caliphate, Muhammad ibn Qasim defeats Raja Dahir, king of Sindh Region in modern-day Pakistan |- |728 | |Narasimhavarman II of the Pallava dynasty constructs the Shore Temple of Mamallapuram |- |736 | |Delhi is re-established by Bilan Deo Tomar also known as Anangpal Tomar |- |738 | |Confederacy of Indian kings consisting of Nagabhata I of Gurjara-Pratihara dynasty and Bappa Rawal, ruler of Mewar defeat Arab Umayyad Caliphate invasion attempts in the Battle of Rajasthan (738 CE) |- |739 | |Avanijanashraya Pulakeshin of the Chalukyas of Navasarika kingdom defeats an invasion attempt by the Arab Umayyad Caliphate. |- |753 | |Establishment of Rashtrakuta Kingdom of Manyakhet by Dantidurga by defeating Chalukyas of Badami |- |753 | |Saindhava naval fleet defeats Arab naval fleet sent by the Arab governor of Sindh. |- |776 | |Saindhava naval fleet under Agguka I defeats second Arab naval expedition. |- |788 | |Birth of Adi Shankara |} === 9th century === {| class="wikitable" !Year !Date !Event |- |800 | |Vikramashila University is established by the Pala emperor Dharmapala in present-day Bhagalpur district in Bihar, in early 9th century |- |814 | |Nripatunga Amoghavarsha I becomes Rashtrakuta emperor. Kannada literature flourishes. |- |836 | |Gurjara-Pratihara (to 910) |} === 10th century === {| class="wikitable" !Year !Date !Event |- |935 | |Chandrapur University established in 935 CE by Srichandra, a ruler of the Chandra dynasty |- |985 | |Rajaraja Chola ascends to the throne of Chola empire. He expands the empire to Sri Lanka and to the north to include Kalinga kingdom |- |993 | |Rajaraja Chola invades Sri Lanka and captures the northern half of Sri Lanka. |} === 11th century === {| class="wikitable" !Year !Date !Event |- |1000 | |Invasion of Mahmud of Ghazni Begins(1000–1025) CE |- |1003–1010 | |The Brihadisvara Temple, Thanjavur is built by Raja Raja Chola I. |- | rowspan="2" |1014 | |Rajaraja Chola adds the Lakshadweep and Maldives islands to the Chola empire. |- | |Rajendra Chola I became the king of Chola empire after his father Rajaraja Chola. During his reign, he extended the influences of the already vast Chola empire up to the banks of the river Ganges in the north and across the ocean. Rajendra's territories extended coastal Burma, the Andaman and Nicobar Islands, Lakshadweep, Maldives, conquered the kings of Srivijaya (Sumatra, Java and Malay Peninsula in South East Asia) and Pegu islands with his fleet of ships. He defeated Mahipala, the Pala king of Bengal and Bihar, and to commemorate his victory he built a new capital called Gangaikonda Cholapuram. The Cholas became one of the most powerful dynasties in Asia during his reign. The Tamil Chola armies exacted tribute from Thailand and the Khmer kingdom of Cambodia. Rajendra Chola I was the first Indian king to take his armies overseas and make conquests of these territories, even though there is epigraphical evidence of Pallava presence in these very areas. |- |1014 | |Mahmud Ghazni defeats the Hindu Shahi king Trilochanapala and annexes Punjab. He then attempts to invade Kashmir, but is defeated by Samgrāmarāja |- |1017 |26 April |Ramanuja is born at Sriperumbudur, Tamil Nadu. |- |1021 | |Mahmud of Ghazni again attempts to invade Kashmir, but is defeated by Samgrāmarāja |- |1025 |30 April |Last invasion of Mahmud Ghazni, sacked and destroyed temple of Somnath |- |1027 | |The Sun Temple of Modhera is completed by Bhima I of the Chaulukya dynasty |- |1030 |30 April |Alberuni arrives in India; death of Mahmud of Ghazni |- |1033 |15 June |Suhaldev, king of Shravasti defeats and kills Ghazi Saiyyad Salar Masud, nephew of Mahmud of Ghazni. |- |1035 | |The Brihadisvara Temple, Gangaikonda Cholapuram is built by Rajendra Chola I. |- |1058 | |Soomra dynasty ends the Arab domination and establishes its own rule over Sindh. |} === 12th century === {| class="wikitable" !Year !Date !Event |- |1120 | |Kalyani Chalukyas power at its peak. Vikramaditya VI ushers in ''Vikrama Chalukya era''. |- |1121 | |Ajayaraja II, of the Chahamanas of Shakambhari dynasty repulse Ghaznavid invasions. |- |1134 | |Life of Basaveshwara, philosopher and social reformer. (to 1196) |- |1149 |30 September |Birth of the Great poet and writer of India Chand Baradai in Lahore |- |1150 | |Bhāskara II, mathematician and astronomer writes the Siddhānta Shiromani, consisting of three books Līlāvatī on arithmetic and measurement, Bijaganita on algebra and ''Gaṇitādhyāya and Golādhyāya'' on astronomy. |- |1157 | |The Kalachuris of Kalyani under Bijjala II capture Kalyani |- |1175 | |Muhammad of Ghor invades India. |- |1178 | |Forces of the Chaulukya king Mularaja II led by his regent mother Naikidevi defeat Ghurid invaders led by Muhammad of Ghor who escapes back to Ghazni, in the Battle of Kasahrada. |- |1191 | |First Battle of Tarain between Mohammed Ghori and Prithviraj III. Ghori is defeated by Prithivi Raj Chauhan III. |- |1192 | |Second Battle of Tarain fought between Muhammed Ghori and Prithviraj Chauhan III. Prithviraj Chauhan III is defeated by Mohammed Ghori. |- |1193 | |Muslim general Muhammad bin Bakhtiyar Khalji destroys the ancient university of Vikramashila |- |1194 | |Battle of Chandawar fought between Muhammad of Ghor and Jaichand of Kannauj. Ghori defeated Jayachandra and killed him. |} === 13th century === {| class="wikitable" !Year !Date !Event |- |1206 |15 March |Khokhars killed Muhammad Ghori during a raid on his camp on the Jhelum River. Marks the end of 14 Years of Ghurid rule over northern India (1192–1206). |- |1206 |12 June |Qutb ud-Din Aibak establishes slave Dynasty (Mamluk) later to be known as Delhi Sultanate. Marks Beginning Of Delhi Sultanate of 320 Years over India(1206–1526). |- |1206 | |Raja Prithu defeats Muhammad Bakhtiyar Khalji, destroying his army of 12,000 with only about 100 survivors. |- |1210 | |Qutb-ud-din Aibak died while playing polo. |- |1210 | |Shams ud-Din Iltutmish;was the third ruler of the Delhi Sultanate, belonging to the Mamluk dynasty (Slave Dynasty). He introduced IQTA (Tax, revenue) system. Died in 1236 |- |1211–1215 | |Anangabhima Deva III of the Eastern Ganga dynasty in present-day Odisha defeats invasions by Ghiyāth ad-Dīn ʿIwaz Khalji the ruler of Bengal. |- |1221 | |Genghis Khan invades Punjab in pursuit of the fleeing Khwarezm Shah Jalal ad-Din Mingburnu and defeats him in the Battle of the Indus. |- |1226 | |Raja Prithu repulses invading forces of Ghiyas ud din Balban the ninth sultan of the Mamluk dynasty of Delhi, in present-day Assam |- |1229 | |Sandhya (ruler of Kamarupa) in present-day Assam drives Muslims out of his territory and captures territory till Karatoya river. Thereafter, to avenge previous defeats, he invades the western border of Gaur (Lakhnauti) and annexes regions across the Karatoya into his kingdom. |- |1236 | |Narasingha Deva I ruler of the Eastern Ganga dynasty in present-day Odisha launches attacks against the Turko-Afghan rulers of Mamluk dynasty in Bengal that had captured Bihar and Bengal and not only repulses their attacks, but pushes them as far back as Padma River in current-day Bangladesh. |- |1236 |10 November |Rule of Razia Sultana – Daughter of Iltutmish. |- |1238 |October |Sri Madhwacharya born in Pajaka near Udupi, Karnataka |- |1240 |14 October |Murder of Razia Sultan by Turkish nobles.(Chalisa) |- |1243 | |Narasingha Deva I ruler of the Eastern Ganga dynasty defeats Tughral Tughan Khan of the Mamluk Sultanate of Delhi in the Battle of Katasin and annexes several districts of Bengal into his empire. |- |1246–66 | |Rule of Nasiruddin Mahmud with support of Balban (Wazir and powerful member of Chalisa). Chalisa- a council of 40 members |- |1250 | |The Konark Sun Temple is completed, built by Narasingha Deva I. |- |1257 | |The Kamrup kingdom, led by its ruler Sandhya defeats and executes Malik Ikhtiyaruddin Yuzbak, the Mamluk Governor of Bengal. His domains are split between the Kamrup kingdom and Narasimhadeva I of the Eastern Ganga Empire. |- |1266–1286 | |Rule of Balban; Chalisa wiped out. |- |1267 | |The Mahanubhava philosophy established by Chakradhar Swami. |- |1275 | |Birth of saint Dnyaneshwar. |- |1290 | |Murder of Muiz ud din Qaiqabad by Jalaluddin Firuz Khalji, an army commander. |- |1290–96 | |Jalal-ud-din Khilji. Founder of Khiliji Dynasty |} === 14th century === {| class="wikitable" !Year !Date !Event |- |1309 | |Alauddin Khalji sends Malik Kafur to South. Malik Kafur Lays siege on the Kakatiya Capital Warangal and Extracts Tribute. The diamond Kohinoor was among the loot collected. |- |1310 | |Ala-ud-din Khilji's army under Malik Kafur occupies Devagiri ending the Seuna Yadava Kingdom |- |1311 | |Malik Kafur attacks the Hoyasalas. In the aftermath of the destruction Hoyasalas abandon the old capital Halebidu. He later attacks Madurai. The attacks on Warangal, Halebidu and Madurai is accompanied by wide scale killing, destruction of temples and repatriation of wealth back to Delhi. |- |1323 | |Ulugh Khan (Muhammad bin Tughluq) defeats Prataparudra II ending the Kakatiya dynasty |- |1333 | |Prithvi Chand II of the Hindu Katoch kingdom of Kangra defeats the army of Muhammad bin Tughluq who loses nearly all his 10,000 soldiers and is forced to retreat. |- |1334 | |Musunuri Kapaya Nayaka with assistance from the Hoysala ruler Veera Ballala III leads a rebellion against the Tughluq rule of Delhi Sultanate, driving it out of Warangal region in present-day Telangana. |- | rowspan="2" |1336 | |Vijayanagara Empire established by Harihara I and his brother Bukka Raya I. |- | |Rana of Mewar Hammir Singh defeats and captures Tughlaq dynasty ruler Muhammad bin Tughluq in the Battle of Singoli. |- |1340 | |Birth of great mathematician Madhava of Sangamagrama who goes on to found the Kerala school of astronomy and mathematics and write the Venvaroha, which describes the methods for the computation of the true positions of the Moon at intervals of about half an hour for various days in an anomalistic cycle. |- |1343 | |Veera Ballala III captured and killed in the Battle of Kannanur. |- |1347 | |Governor Hasan Gangu revolts against Muhammad bin Tughluq founding the Bahmani Sultanate |- |1351 | |Samma Dynasty assumes rule over Sindh |- |1370 | |Bukka, the Vijayanagara ruler and his son Kumara Kamapna capture the entire Tamil speaking parts. |- |1398 | |Timur plunders Lahore |} === 15th century === {| class="wikitable" !Year !Date !Event |- |1401 | |Dilawar Khan establishes the Malwa Sultanate in present-day northern India |- |1407 | |Zafar Khan: governor of Gujarat, declares himself as Sultan Muzaffar Shah founding the Gujarat Sultanate/Muzaffarid dynasty |- |1414 | |Khizr Khan, deputized by Timur to be the governor of Multan takes over Delhi founding the Sayyid dynasty |- |1424 | |Deva Raya II succeeded his father Veera Vijaya Bukka Raya as monarch of the Vijayanagara Empire |- |1437 | |Rana Kumbha of Mewar and Rao Ranmal Rathore of Marwar defeat and take prisoner Mahmud Khalji, Sultan of the Malwa Sultanate in the Battle of Sarangpur |- |1442 | |Rana Kumbha of Mewar defeats Mahmud Khalji in the Battle of Mandalgarh |- |1443 | |Abdur Razzaq visits India |- | rowspan="2" |1446 | |Rana Kumbha of Mewar defeats Mahmud Khalji in the Battle of Banas |- | |Mallikarjuna Raya succeeds his father Deva Raya II |- |1449 |26 September |Sankardev, founder of Ekasarana Dharma was born in Nagaon, Assam. |- |1450 | |Shri Guru Ravidas Ji was born in 1450 in Varanasi. He was an Indian mystic poet-sant of the Bhakti movement during the 15th to 16th century CE. Venerated as a guru in the region of Punjab, Uttar Pradesh, Rajasthan, Maharashtra and Madhya Pradesh, the devotional songs of Ravidas have had a lasting impact upon the bhakti movement. |- |1451 |19 April |Bahlul Khan Lodhi ascends the throne of the Delhi sultanate starting the Lodhi dynasty |- |1456 | |Rana Kumbha of Mewar defeats the combined armies of Shams Khan (sultan of Nagaur) and Qutbuddin Ahmad Shah II (Sultan of Gujarat) in the Battle of Nagaur and captures Nagaur, Kasili, Khandela and Shakambhari. Nagaur Sultanate ceases to exist. |- |1469 |15 April |Guru Nanak, the founder of Sikhism is born |- |1483 |14 February |Birth of Babur in Andijan, Fergana Valley in Central Asia |- |1485 | |Saluva Narasimha Deva Raya drives out Praudha Raya ending the Sangama Dynasty |- |1486 | |Advent of Chaitanya Mahaprabhu, founder of Gaudiya Vaishnavism and leader of the world's first civil disobedience movement, in Navadwip, West Bengal |- |1490 | |Ahmadnagar declares independence, followed by Bijapur and Berar in the same year thus breaking up the Bahmani Sultanate. |- |1492 |30 March |Satal Rathore of Marwar kills Afghan warlord Gudhla Khan in the Battle of Peepar, to rescue 140 girls abducted by the Afghans. He later succumbs to injuries sustained in the battle. |- |1498 |20 May |Vasco de Gama was the first portage's sailor first voyage from Europe to India and back (in 1499) |} == Colonial India == Main article: Colonial India === 16th century === {| class="wikitable" !Year !Date !Event |- |1503 | |Kingdom of Cochin is taken over by the Portuguese creating the first European settlement in India. |- |1508 |3 February |The Christian-Islamic power struggle in Europe and the Middle East. Spills over into the Indian Ocean as Battle of Chaul during the Portuguese-Mamluk War |- |1509 |3 February |Battle of Diu marks the beginning of the dominance of the Europeans in the Asian naval theater. |- |1510 |20 May |Portuguese India (to 1961) |- |1518 | |Kingdom of Mewar under Rana Sanga defeats Lodi Empire under Ibrahim Lodhi in the Battle of Khatoli, gains control over north eastern Rajasthan. |- |1519 | |Kingdom of Mewar under Rana Sanga defeats the Malwa Sultanate and the Gujarat Sultanate in the Battle of Gagron, obtains control of Malwa. |- |1519 | |The Kingdom of Mewar under Rana Sanga again defeats Lodi Empire under Ibrahim Lodi in the Battle of Dholpur, extends control up to Agra. |- | rowspan="3" |1520 | |Vijayanagara Empire under Krishnadevaraya defeats the Sultanate of Bijapur in the Battle of Raichur. |- | |Rana Sanga leads a coalition of Rajput armies to invade the Gujarat Sultanate, reinstates Raimal as the Rao of Idar. The Sultan of Gujarat is forced to flee to Muhammadabad. |- | |Death of mystic poet-sant of the Bhakti movement Shri Guru Ravidas. |- |1522 | |Portuguese land on the Coromandel Coast |- |1523 | |Portuguese explorers established Santhome Church above the Tomb of Saint Thomas the Apostle in Chennai. |- |1526 |21 April |Sultan Ibrahim Lodi, of the Delhi Sultanate, angers local nobles, who respond by inviting Babur, the Mughal ruler of Kabul, to invade Delhi and Agra. The local population, plus the possession of artillery, assists Babur in killing the Sultan (whose soldiers desert him) at the Battle of Panipat. Marks the Beginning of Mughal Empire for 231 Years Rule Over India (1526–1757) CE. |- |1527 |17 March |Babur bribes Mewar general Silhadi promising Silhadi a kingdom, if Silhadi betrays Mewar King Rana Sanga in Battle of Khanwa, thus leading to the annexation of Mewar. |- | rowspan="2" |1530 | |Astronomer-mathematician Jyeṣṭhadeva of the Kerala school of astronomy and mathematics writes the Yuktibhāṣā, a major treatise on mathematics and astronomy in Malayalam |- |28 March,27 January |Babur completes his Baburnama, reflecting on society, politics, economics, history, geography, nature, flora and fauna, which to this day is a standard textbook in 25 countries. Babur dies, and is succeeded by his son Humayun. |- |1532 | |Ahoms under king Suhungmung defeat Turbak Khan of the Bengal Sultanate in Battle of Hatbor. |- | rowspan="2" |1539 | |Battle of Chausa fought between Humayun and Sher Shah Suri in which Humayun defeated. |- | |Guru Angad Dev becomes second guru of Sikhs. |- | rowspan="2" |1540 |18 September |Battle of Kannauj fought between Humayun and Sher Shah Suri and Humayun was completely defeated. Humayun lost the Mughal empire to Afghans (Suri Dynasty), and passed 12 years in exile. |- |9 May |Birth of Maharana Pratap Singh of Mewar ( son of Maharana Udai Singh II ) |- |1542 |15 October |Birth of Akbar at Umerkot. |- |1545 |22 May |Death of Sher Shah Suri and succeeded by Islam Shah Suri. |- |1552 |26 March |Guru Amar Das becomes third Guru of Sikhs. |- |1554 |22 November |Death of Islam Shah Suri. |- |1555 |22 May |Humayun regained the throne of Delhi from the hands of weak successors of Sher Shah. |- | rowspan="3" |1556 |27 January |Humayun converts from Sunni Islam to Shia Islam, to gain the alliance of the Shah of Persia. Humayun dies, and is succeeded by his son Akbar. |- |7 October |Hindu king Hemu defeats Mughal forces in the Battle of Tughlaqabad |- |5 November |Hindu king Hemu establishes 'Hindu Raj' in North India and bestowed with title of "Vikramaditya"; Second Battle of Panipat fought between Hemu and Akbar's forces in which Hemu is killed. |- |1565 |26 January |Battle of Talikota results in the rout of Vijayanagara empire. |- |1568 | |Paradesi Synagogue, the first Jewish synagogue in India constructed by the Paradesi Jews. |- |1572 | |Akbar annexes Gujarat, also shifts the Mughal capital to Fatehpur Sikri where a new township and citadel containing buildings of a unique all-India character—inspired by the architecture of Bengal, Gujarat, Malwa, Kashmir as well as the Timurid world—is born. |- | rowspan="2" |1574 |1 September |Guru Ram Das becomes fourth Guru of Sikhs. |- | |Akbar annexes Bengal. |- |1581 |1 September |Guru Arjan Dev becomes fifth Guru of Sikhs. |- |1582 | |Maharana Pratap defeats Mughal Forces of Akbar in Battle of Dewair in present-day Rajasthan |- |1586 |6 October |Akbar annexes Kashmir. |- |1589 | |Harmandir Sahib (Golden Temple) build in Amritsar by Guru Arjan |- |1600 |31 December |East India Company is formed in England. Gets exclusive trading rights with India. |} === 17th century === {| class="wikitable" !Year !Date !Event |- |1602 | |Dutch came to India at Pulicut (back to 1825). |- |1605 |27 October |Akbar dies, and is succeeded by his son Jahangir. |- | rowspan="2" |1606 |25 May |Guru Hargobind is selected to becomes the sixth guru of Sikhs by Guru Arjan |- |30 May |Guru Arjan is tortured and killed under orders of Mughal Emperor Jahangir for refusing to convert to Islam. |- | rowspan="2" |1612 |30 November |British India (to 1947) |- |24 August |East India Company enters into a trade agreement with the Mughal Emperor Jahangir |- |1616 | |Susenghphaa, ruler of the Ahom kingdom defeats Mughal forces in a land and naval battle at Bharali, Assam. |- |1621 | |Sikhs army led by Guru Hargobind defeat Mughals in the Battle of Rohilla |- |1628 | |Jahangir announces "Chain of Justice" outside his palace that anyone can ring the bell and get a personal hearing with the emperor. Jahangir dies, and is succeeded by his son Shah Jahan. |- |1630 |19 February |Birth of Chhatrapati Shivaji Maharaj. |- |1634 |14 April |Sikhs army led by Guru Hargobind defeat Mughals in the Battle of Amritsar (1634) |- |1634 |15 October |Sikhs army of 2000 led by Guru Hargobind defeat a Mughal army of 36000 in the Battle of Lahira and kill the Mughal generals Qumar Beg and Lala Beg. |- |1635 |25 April |Sikhs army of 1800 led by Guru Hargobind defeat a Mughal army of 52000 in the Battle of Kartarpur |- | rowspan="2" |1644 |8 March |Guru Har Rai becomes seventh guru of Sikhs |- | |Chhatrapati Shivaji Maharaj takes oath of Independence at Raireshwar. |- |1640 | |Rani Karnavati of the Garhwal Kingdom repels and defeats invasion attempt by Mughal army of Shah Jahan. |- |1658 | |Shah Jahan completes Taj Mahal, Jama Masjid, and Red Fort. Imperial treasuries drained by architectural and military overexpenditures. Shah Jahan put under house arrest, and is succeeded by his son Aurangzeb. |- | rowspan="2" |1659 |19 February |Chhatrapati Shivaji Maharaj's ill-equipped and small Maratha army defeat numerically much larger Adilshahi troops at the Battle of Pratapgarh marking the first victory of the Maratha Empire. Chhatrapati Shivaji Maharaj personally kills Adilshahi commander Afzal Khan (general). |- |27 December |Marathas under Chhatrapati Shivaji Maharaj defeat the Adilshahi troops in the Battle of Kolhapur |- |1660 |13 July |Maratha army of 600 defeats a much larger army of the Bijapur Sultanate of 10,000 in the Battle of Pavan Khind, near the city of Kolhapur. |- | rowspan="2" |1661 |3 February |Marathas under Chhatrapati Shivaji Maharaj defeat Mughal Empire forces in the Battle of Umberkhind. |- |6 October |Guru Har Krishan becomes eight guru of Sikhs. |- |1664 |6–10 January |Marathas under Chhatrapati Shivaji Maharaj defeat Mughal Empire forces in the Battle of Surat. |- | rowspan="2" |1665 |13 February |Chhatrapati Shivaji Maharaj conducts a raid on the Portuguese colony in Basrur and gains a large booty which enables him to strengthen the base of his new kingdom by building a strong navy and forts. |- |20 March |Guru Tegh Bahadur becomes ninth Guru of Sikhs. |- |1665 |11 June |Treaty of Purandar (1665) (or पुरंदर चा तह) was signed on 11 June 1665, between Chhatrapati Shivaji Maharaj and the Rajput ruler Jai Singh I. |- |1669 |28 November |Jats defeats the Mughal Empire in the Battle of Tilpat takes control of Mathura |- |1670 |4 February |Marathas under Chhatrapati Shivaji Maharaj capture the fort of Sinhagad (then known as Kondhana) from the Mughals in the Battle of Sinhagad. |- | rowspan="2" |1671 | |Ahom kingdom defeats the Mughal Empire in the Battle of Saraighat, takes back control of Guwahati |- | |Chhatrasal revolts against the Mughal Empire with an army of only 5 horsemen and 25 swordsmen. In ten years he conquers a large tract of land between Chitrakoot, Chhatarpur and Panna in the east and Gwalior in the west, and from Kalpi in the north to Sagar, Garhakota, Shahgarh and Damoh in the south. |- |1672 |February |Maratha forces under Prataprao Gujar defeat a Mughal army twice its size in the Battle of Salher |- |1674 |6 June |Shivaji is crowned Chhatrapati. |- | rowspan="2" |1675 |6 May |Marathas defeat the Bijapur Sultanate and capture the Fortress of Ponda after the Siege of Ponda |- |24 November |Guru Tegh Bahadur, the ninth Guru of Sikhs is tortured and executed in Delhi by the order of Aurangzeb for his support for the Kashmiri Hindus to practice their religion and for refusing to convert to Islam. Guru Gobind Singh becomes tenth Guru of Sikhs. |- | rowspan="3" |1680 |3 April |Chhatrapati Shivaji Maharaj dies of fever at Raigad. |- |20 July |Sambhaji becomes 2nd Chhatrapati of the Maratha Empire |- | |Kingdom of Venad defeats the Mughal Empire in the Battle of Manacaud |- | rowspan="2" |1681 | |Aurangzeb invades the Deccan |- |31 January – 2 February |Maratha ruler Chhatrapati Sambhaji Maharaj attacks and sacks the Mughal city Burhanpur |- |1682 |August |Ahom kingdom defeats the Mughal Empire in the Battle of Itakhuli, takes back control of Kamrup region |- |1684 | |Marathas under Chhatrapati Sambhaji Maharaj repel a Mughal attempt to invade Konkan. Mughals are forced into a slow retreat and suffer great losses. |- |1687 |16 December |Marathas under Chhatrapati Sambhaji Maharaj defeat the Mughal Army in the Battle of Wai. However, Maratha General Hambirrao Mohite is killed. |- |1688 | |The Sikandara was plundered by Rajaram Jat. Even the skeleton of Akbar, was taken out and the bones were consumed to flames. |- |1689 |11 March |After being ambushed and captured by the Mughals, Chhatrapati Sambhaji Maharaj is tortured and killed for refusing to convert to Islam. Rajaram I becomes the third Chhatrapati of the Maratha Empire. |- |1690 | |Maratha Empire defeats the Mughal Empire in the Battle of Athani |- |1691 | |Joint forces of Bhim Chand (Kahlur) of Bilaspur and Guru Gobind Singh defeat Mughal army in the Battle of Nadaun. |- |1692 |December |Maratha General Santaji Ghorpade defeats Mughal General Alimardan Khan and captures him. Mughal army under Zulfikhar Ali Khan defeated by Santaji and Dhanaji Jadhav and Zulfiquar Khan is forced to sue King Rajaram for peace |- |1693 |21 November |Maratha General Santaji Ghorpade defeats Mughal General Himmat Khan. |- |1695 |20 November |Maratha General Santaji Ghorpade defeats and kills Mughal General Kasim Khan. |- | rowspan="2" |1696 | |Sikhs under Guru Gobind Singh defeat Mughal forces in the Battle of Guler (1696) |- |20 November |Danish India (to 1869) |- |1699 |3 October |Guru Gobind Singh, the 10th Guru of Sikhs creates Khalsa, the saint-soldier at Anandpur Sahib, Punjab. |} === 18th century === {| class="wikitable" !Year !Date !Event |- | rowspan="2" |1700 | |Sikhs army of 1000 under Guru Gobind Singh defeats Mughal army numbering 10,000 in the Battle of Anandpur (1700) |- |3 March |Rajaram I dies. The infant Shivaji II becomes the Chhatrapati of the Maratha Empire, with his mother Tarabai as the regent. She continues the Maratha battles against the Mughal Empire, leading the Maratha army herself. |- |1702 | |Sikhs army under Guru Gobind Singh defeats Mughal army in the Battle of Nirmohgarh (1702) |- | rowspan="2" |1707 |13 February |Birth of Suraj Mal son of Badan Singh |- |3 March |Death of Aurangzeb the Mughal monarch. Marks the end of Mughal Territorial Expansion over India. |- |1708 |7 October |Guru Gobind Singh is assassinated by Mughals and the Guru Granth Sahib becomes the eternal Guru of the Sikhs. |- |1710 |12 May |Sikh army under Banda Singh Bahadur defeats Mughal Empire in the Battle of Chappar Chiri and establishes Sikh rule from Lahore to Delhi. |- |1717 | |Meitei king Pamheipa (Gharib Nawaz (Manipur)) introduces Hinduism as the state religion and changes the name of the kingdom to the Sanskrit Manipur. |- | rowspan="2" |1721 |March – October |Attingal Outbreak takes place |- |13–14 November |Madras cyclone occurs |- |1720 | |Bajirao I appointed by Shahu Maharaj as Peshwa (prime minister) who would later expand the Maratha empire to cover most of present-day India. |- |1724 | |Meitei king Gharib Nawaz of the Ningthouja dynasty invades Burma. |- |1728 |28 February |Bajirao I defeats the combined forces of the Mughal Empire and the Nizam of Hyderabad in the Battle of Palkhed |- |1729 |March |Maratha Empire under Bajirao defeats Mughal Empire, in response for an appeal for help from Chhatrasal, ruler of Bundelkhand in the Battle of Bundelkhand |- |1731 | |Maratha Empire under Bajirao defeats Mughal Empire and Maratha rebel factions in the Battle of Dabhoi |- | rowspan="2" |1737 |16 March |Marathas under Bajirao I defeat the Mughal Empire in the Battle of Delhi (1737) |- |24 December |Marathas defeat a combined army of the Mughal Empire, Nizam of Hyderabad, Nawab of Awadh and Nawabs of Bhopal in the Battle of Bhopal |- | rowspan="2" |1739 |17 February – 16 May |Marathas under Bajirao I defeat the Portuguese in the Battle of Vasai, Portuguese army and administration pulled out of Baçaim (Vasai). |- |March |Nader Shah invades India from Iran. Nader Shah captures and sacks Delhi. |- |1740 |May |Raghoji I Bhonsle of the Maratha Empire defeats and kills Dost Ali Khan the Mughal Nawab of Arcot in the Battle of Damalcherry. |- | rowspan="2" |1741 |26 March |Maratha army defeats the Nawab of Carnatic and captures Trichinopoly after the Siege of Trichinopoly (1741) |- |10 August |Kingdom of Travancore under Marthanda Varma defeats the Dutch Empire in the Battle of Colachel. |- | rowspan="2" |1753 |10 May |Jats under Suraj Mal defeat the Mughal Empire in the Capture of Delhi (1753) |- |15 August |Treaty of Mavelikkara signed between the Kingdom of Travancore and the Dutch East India Company, effectively ending the political and commercial dominance of the Dutch on the Kerala coast and beginning of the end of Dutch influence in India. |- |1754 |20 January – 18 May |Bharatpur State defeat the Marathas in Battle of Kumher. |- |1756 | |Black Hole of Calcutta infamous incident where soldiers of East India Company were held hostage in tortuous conditions, later served as a precedent for the Battle of Plassey |- | rowspan="3" |1757 |16 January |Maratha Empire defeats Durrani Empire, in the Battle of Narela. |- |23 June |British East India Company defeats the Nawab of Bengal in the Battle of Plassey, marking the End of Islamic period of 565 Years over India (1192–1757) & beginning of British conquests in India. |- |11 August |Maratha Empire defeats Rohilla Afghans in the Battle of Delhi (1757), captures Delhi. |- |1757 |12 February |Jats under Suraj Mal defeat Durrani Empire, in the Battle of Bharatpur. |- | rowspan="3" |1758 | |Third Carnatic War |- |28 April |Maratha Empire led by Raghunathrao and Mahadaji Shinde defeats Durrani Empire in the Battle of Attock (1758), captures Attock. |- |8 May |Maratha Empire led by Raghunathrao, Malhar Rao Holkar and Tukoji Rao Holkar defeats Durrani Empire in the Battle of Peshawar (1758), captures Peshawar. |- | rowspan="2" |1759 | |French India (to 1954) |- | |Maratha Empire supported by Sikh Sukerchakia Misl defeats Durrani Empire in the Battle of Lahore (1759) |- |1760 |3 January |Marathas comprehensively defeat the Nizam in the Battle of Udgir. Maratha Empire reaches its zenith. |- |1760 | |Battle at Wandewash, British troops beat French |- | rowspan="4" |1761 |January |The Marathas are routed in the Third Battle of Panipat on 14 January 1761, by the Afghans led by Ahmad Shah Durrani, also known as Ahmad Shah Abdali. The battle is considered one of the largest battles fought in the 18th century. |- |12 June |Capture of Agra Fort by the Kingdom of Bharatpur led by king Suraj Mal, defeating the armies of the Mughal Empire and Rohilla Afghans |- |August |The Sukerchakia Misl of Dal Khalsa (Sikh Empire) defeats the Durrani Empire in the Battle of Sialkot (1761) |- |September |The Sikh Confederacy defeats the Durrani Empire in the Battle of Gujranwala (1761) |- | rowspan="2" |1762 |5 February |Vadda Ghalughara, the massacre of 30,000 Sikhs, mostly non-combatants, by the army of Ahmad Shah Durrani |- |May |Sikh Misls under Jassa Singh Ahluwalia defeat the Durrani Empire in the Battle of Harnaulgarh |- | rowspan="2" |1763 |10 August |Maratha Empire led by Madhavrao I defeats the Nizam of Hyderabad in the Battle of Rakshasbhuvan and gains territory. |- |25 December |Suraj Mal dies |- | rowspan="2" |1764 |26 February |Sikh Misls under Jassa Singh Ahluwalia defeat the Durrani Empire in the Battle of Sirhind (1764) and capture Sirhind |- |22 October |Battle of Buxar (British victory against allied Mughal, Bengal and Oudh forces) |- |1765 |February |Kingdom of Bharatpur led by king Jawahar Singh defeats the Mughal Empire in the Battle of Delhi (1764) |- |1767 | |First Anglo-Mysore War begins, in which Hyder Ali of Mysore defeats the armies of the British East India Company. |- |1770 | |Great Bengal famine of 1770, estimated to have caused the deaths of about 10 million people. Warren Hastings's 1772 report estimated that a third of the population in the affected region starved to death. The famine is attributed to failed monsoon and exploitative policies of the East India Company. |- |1771 | |Marathas led by Mahadaji Shinde defeat Rohilla Afghans and re-capture Delhi and parts of North India, thus reasserting their supremacy in north India. As revenge for the losses in the Battle of Panipat, the Maratha army devastated Rohilkhand by looting and plundering and also took the members of royal family as captives. |- |1772 |22 May |Ram Mohan Roy Born (to 1833) |- | rowspan="3" |1773 | |Narayanrao Peshwa is murdered by his uncle Raghunathrao's wife in front of Raghunathrao. |- | |Regulating Act of 1773 |- | |Warren Hastings appointed as first Governor-General of Bengal |- |1774 | |Chief Justice of the Maratha Empire, Ram Shastri passes death sentence against the ruling Peshwa Raghunathrao for murdering his nephew. |- | rowspan="2" |1775 | |First Anglo-Maratha War |- |June |Alliance of Shekhawat chieftains and Kingdom of Jaipur defeat the Mughal Empire supported by Baloch chieftains in the Battle of Mandan |- |1779 | |Maratha ''sardar'' Mahadji Shinde routs the East India Company army at the Battle of Wadgaon. War ends with the restoration of status quo as per Treaty of Salbai. |- |1780 | |Second Anglo-Mysore War begins. |- |1781 | |Maratha Empire defeats forces of the British East India Company in the Battle of Bhorghat. |- | rowspan="2" |1784 | |Second Anglo-Mysore War ends with the Treaty of Mangalore. |- | |Captivity of Mangalorean Catholics at Seringapatam, suffer extreme hardships, torture, death, forcibly converted to Sunni Islam. Of the 60,000–80,000 Christians taken captive, only 15,000–20,000 survive. |- |1786 | |District collectors in Bengal were made responsible for settling the revenue and collecting it. |- |1787 | |Maratha Empire defeats Tipu Sultan, the king of Mysore in the Maratha–Mysore War, resulting in the Treaty of Gajendragad. Tipu Sultan is forced to pay 4.8 million rupees as a war cost to the Marathas, an annual tribute of 1.2 million rupees and return all the territory captured by his father Hyder Ali |- | rowspan="2" |1789 | |Third Anglo-Mysore War begins. |- | |Tipu Sultan invades Malabar (present day Kerala), destroys a number of temples including the temples of Bhagamandala, Payyavoor, Ammakoottam Mahadevi temple and Thrikkadamba Sri.mahavishnu temple. Thousands are killed, women raped and populace forced to convert to Islam, |- | rowspan="2" |1790 | |The Marathas under Holkar and General de Boigne defeat the Rajputs of Jaipur and Mughals at the Battle of Patan, where 3000+ Rajput cavalry is killed and the entire Mughal unit vanquished. The defeat crushes Rajput hope of independence from external influence |- |May |Kingdom of Travancore defeats the Kingdom of Mysore in the Battle of Nedumkotta |- |1792 | |Third Anglo-Mysore War ends. |- |1793 | |Birth of Rani Rashmoni, one of the pioneers of the Bengali Renaissance. |- | rowspan="2" |1795 |11 March |Maratha Empire defeats the Nizam of Hyderabad in the Battle of Kharda, Nizam ceded territory. |- |13 August |Death of Ahilyabai Holkar |- |1796 | |Ching-Thang Khomba moves Manipur's capital to Kangla |- |1798 | |Fourth Anglo-Mysore War begins. |- | rowspan="2" |1799 | |Fourth Anglo-Mysore War ends with the death of Tipu Sultan, the victory of the East India Company, and the restoration of their ally, the Wodeyar dynasty of Mysore. |- | |Polygar War |- |1800 |13 March |Death of Nana Fadnavis |} === 19th century === {| class="wikitable" !Year !Date !Event |- |1801 |12 April |Maharaja Ranjit Singh establishes Khalsa rule of Punjab from Lahore. Khalsa army liberates Kashmiri Pandits and invades Afghanistan via the Khyber Pass. |- |1802 | |The Kingdom of Kottayam defeats the British East India Company in the Battle of Panamarathukotta |- |1803 | |The Second Anglo-Maratha War begins. |- |1805 |17 December |The Second Anglo-Maratha War ends. |- |1806 |10 July |Vellore mutiny |- |1807 | |Hari Singh Nalwa, commander of the Sikh Khalsa Army of the Sikh Empire defeats the Durrani Empire in the Battle of Kasur, the first in a series of battles. |- |1809 |25 April |The East India Company signs the first Treaty of Amritsar with Ranjit Singh. |- |1811 |28 October |The death of Yashwantrao Holkar |- |1813 |13 July |Dewan Mokham Chand and Hari Singh Nalwa, commanders of the Sikh Khalsa Army of the Sikh Empire defeat the Durrani Empire in the Battle of Attock and capture Attock |- |1814 |15 January |"Atmiya Sabha" is established by Raja Ram Mohan Roy. |- |1817 |3 June, 20 January |The Third Anglo-Maratha War begins. Establishment of Hindu College (Presidency College, now Presidency University, Kolkata) |- | rowspan="2" |1818 |March – 2 June |Sikh Empire defeats the Durrani Empire and captures Multan after the Siege of Multan (1818). |- |31 December |The Third Anglo-Maratha War ends with the defeat of Bajirao II and the end of the Maratha Empire, leaving the East India Company with control of almost the whole of India. |- |1819 |3 July |Sikh Empire defeats the Durrani Empire in the Battle of Shopian and captures Srinagar and Kashmir. Islamic rule ends in Jammu and Kashmir. |- |1820 |31 December |Ishwar Chandra Vidyasagar is born (to 1891). |- | rowspan="2" |1823 |5 March |Anglo-Burmese Wars (to 1826) |- |14 March |Sikh Empire defeats the Emirate of Afghanistan and the Nawab of Amb to annex Peshawar Valley, in the Battle of Nowshera |- |1824 |12 February |Dayananda Saraswati is born (to 1883) |- |1825 |December 1825 – January 1826 |Battle between British East India Company and Bharatpur State |- |1826 |4 January |British rule in Burma (to 1947) |- |1827 |11 April |Jyotirao Phule is born (to 1890) |- |1828 |19 November |Rani of Jhansi Laxmi bai was born (to 1858) |- |1829 | |Kol uprising |- |1831 |6 May |Sikh Empire defeats the Mujahideen forces of Syed Ahmad Barelvi in the Battle of Balakot |- |1834 |6 May |Sikh Empire defeats the forces of Afghan Durrani Empire in the Battle of Peshawar (1834). Peshawar becomes part of the Sikh Empire. |- |1836 |18 February |Sri Ramakrishna Paramhansa is born (to 1886) |- |1837 |18 February |Hari Singh Nalwa, commander of the Sikh Khalsa Army defeats the Durrani Empire in the Battle of Jamrud and extends the frontier of Sikh Empire to beyond the Indus River right up to the mouth of the Khyber Pass. |- |1839 | |First Anglo-Afghan War |- | rowspan="2" |1845 |13 January |First Anglo-Sikh Wars (to 1849) |- |4 November |Vasudev Balwant Phadke is born (to 1883) |- |1848 |22 November |The Sikh Empire under Sher Singh Attariwalla defeats the British East India Company under Sir Hugh Gough in the Battle of Ramnagar |- |1849 |13 January |The Sikh Empire under Sher Singh Attariwalla defeats the British East India Company under Sir Hugh Gough in the Battle of Chillianwala |- |1853 |1 April |The Post Service started. |- |1853 |16 April |The first railway is established between Bombay and Thane. |- | rowspan="2" |1855 |31 May |Rani Rashmoni builds the Dakshineswar Kali Temple. |- |30 June |Santhal rebellion |- | rowspan="3" |1856 |25 July |Hindu Widows' Remarriage Act, 1856 |- |23 July |Bal Gangadhar Tilak is born (to 1920) |- |20 August |Narayana Guru is born (to 1928) |- | rowspan="2" |1857 |10 May |British victory in Indian Rebellion of 1857. Last Mughal Emperor Bahadur Shah Zafar was deposed by British East India Company and India transferred to British Crown. Marks the End of Mughal Dynasty rule over India. |- |18 July, 24 January |India's first three universities, the University of Mumbai, the University of Madras and the University of Calcutta, are established. |- | rowspan="3" |1858 |18 June 1858 |Rani of Jhansi, Rani Lakshmibai died |- |1 November |British Raj (to 1947) Marks the Beginning Of Direct British Rule Over India For 89 Years(1858–1947). |- |7 November |Bipin Chandra Pal is born (to 1932) |- |1859 |18 April |Death of Tatya Tope |- |1861 |7 May |Rabindranath Tagore is born. |- |1862 | |The high courts of Calcutta, Madras, and Bombay are established. |- |1863 |12 January |Swami Vivekanand is born (to 1902) |- |1865 |28 January |Lala Lajpat Rai is born (to 1928) |- |1867 |31 March |"Prarthana Samaj" established earlier known as "Atmiya Sabha", "Tahzeeb-ul-Akhlaq" was started |- |1869 |2 October |Mahatma Gandhi is born (to 30 January 1948) Thakkar Bapa is born (to 1951) |- |1873 |24 September |Jyotirao Phule establishes the Satyashodhak Samaj society. |- | rowspan="3" |1875 |10 April |"Arya Samaj" is established. |- | |Aligarh Muslim University |- | |Deccan Riots |- |1876 |25 December |Muhammad Ali Jinnah was born (1876–1948) |- |1877 |1 January |The first Delhi Durbar |- |1883 |30 October |Maharishi Dayanand Saraswati dies |- |1885 |28 December |The Indian National Congress is established |- |1889 |14 November |Jawaharlal Nehru is born (to 1964). |- |1889 |3 December |Khudiram Bose is born (to 1908). |- |1891 |14 April |B. R. Ambedkar is born (to 1956). |- |1891 |31 March |Anglo-Manipur War. |- |1895 |11 May |jiddu krishnamurti is born (to 17 February 1986). |- | rowspan="3" |1897 |23 January |Subhas Chandra Bose is born (to 1945); the first fingerprint bureau of India is established in Calcutta. |- |11 June |Ram Prasad Bismil is born |- |22 June |Chapekar brothers assassinate W.C.Rand. |} == Modern India == === 20th century === {| class="wikitable" !Year !Date !Event |- |1900 |3 March |Maghfoor Ahmad Ajazi is born (to 1966). |- |1902 | |Anushilan Samiti, revolutionary association formed. |- | rowspan="2" |1903 |11 December |British expedition to Tibet |- |1 January |Delhi Durbar Second Time. |- |1904 |5 November |University Act |- | rowspan="2" |1905 | |Bharat Sevak Samaj founded by Gopal Krishna Gokhale. |- |16 October |Partition of Bengal (1905) |- | rowspan="2" |1906 | |Jugantar formed. |- |30 December |Muslim League formed in Dacca. |- |1907 | |Surat Split |- |1908 | |Alipore bomb case |- |1909 | |Morley-Minto Reforms |- | rowspan="2" |1911 | |Cancellation of Partition of Bengal |- | |Delhi Durbar Third Time |- | rowspan="1" |1911 |12 December |The British government moves the capital from Calcutta to Delhi. |- |1912 | |Delhi conspiracy case |- | rowspan="2" |1913 | |Gadar Party formed. |- | |Rabindranath Tagore won Nobel Prize in Literature |- |1914 | |Hindu–German Conspiracy |- | rowspan="3" |1915 | |Ghadar conspiracy |- | |Provisional Government of India formed in Kabul. |- | |Mahatma Gandhi returns to India. |- |1916 | |Lucknow Pact |- | rowspan="2" |1917 | |Champaran Satyagraha |- | |Justice Party (India) is founded |- |1918 | |Kheda Satyagraha and Ahmedabad Mill Strike |- | rowspan="3" |1919 |13 April |Jallianwala Bagh massacre |- | |Montagu–Chelmsford Reforms |- |18 March |Rowlatt Act is passed Diarchy |- |1920 | |Non-cooperation movement Khilafat Movement |- |1922 |5 February |Chauri Chaura incident |- |1924 | |The Hindustan Socialist Republican Association is formed. |- |1925 |9 August |Kakori conspiracy |- |1925 |27 September |Rashtriya Swayamsevak Sangh (RSS) is founded. |- | rowspan="2" |1927 |20 March |Mahad Satyagraha |- |November |Simon Commission |- |1928 | |Bardoli Satyagraha |- | rowspan="2" |1929 | |Central Assembly bombed by Bhagat Singh and Batukeshwar Dutt. |- | |Purna Swaraj resolution. |- | rowspan="2" |1930 | |Salt Satyagraha, the civil disobedience movement, begins with the Dandi march. |- | |The first Round Table Conferences (India) |- | rowspan="3" |1931 |March |Gandhi–Irwin Pact |- |23 March |Bhagat Singh, Rajguru and Sukhdev martyred |- |September–December |The second Round Table Conferences (India) |- | rowspan="3" |1932 |24 September |Poona Pact |- |16 August |Communal Award |- |November–December |The third Round Table Conferences (India) |- |1935 |August |Government of India Act 1935 |- |1937 | |1937 Indian provincial elections |- |1939 | |The All India Forward Bloc established by Subhas Chandra Bose |- | rowspan="3" |1940 |23 March |Lahore Resolution |- | |The All-India Jamhur Muslim League established by Maghfoor Ahmad Ajazi to support a united India |- |8 August |August offer 1940 |- | rowspan="2" |1942 |late March |Cripps' mission |- |August |1. Quit India Movement 2. The Indian National Army is established by Subhas Chandra Bose. |- |1943 | |Arzi Hukumat-e-Azad Hind, the Provisional Government of Free India is formed by Netaji. |- |1944 | |Subhas Chandra Bose calls Mahatma Gandhi the Father of the Nation. |- | rowspan="2" |1945 |18 August |Subhas Chandra Bose death in plane crash at Taiwan. |- | |Wavell Plan, Simla Conference |- | rowspan="4" |1946 |February |Royal Indian Navy mutiny |- |March |Cabinet Mission |- |16 August |Direct Action Day/Great Calcutta Killings |- |October–November |Noakhali riots |- | rowspan="4" |1947 |July |Indian Independence Act 1947 by British Raj |- |14 August |Partition of India and Pakistan becomes an independent state |- |15 August |Indian independence from the British Raj. |- | |Hundreds of thousands die in widespread communal bloodshed after partition, continuing to 1948. |- | rowspan="3" |1948 |30 January |Mahatma Gandhi is assassinated by Nathuram Godse. |- | |War with Pakistan over disputed territory of Kashmir. |- | |Telangana and other princely states are integrated into Indian union. |- |1950 |26 January |India became a republic. |- |1951 | |Reconstruction of the Somnath temple under the orders of the Home Minister of India Vallabhbhai Patel. |- |1951 | |Congress Party wins first general elections under leadership of Jawaharlal Nehru (to 1952). |- |1955 | |Nationalisation of the Indian insurance sector. Establishment of LIC. |- | rowspan="2" |1956 |14 October |B. R. Ambedkar converted to Buddhism along with 600,000 followers. |- |6 December |B. R. Ambedkar died. States Reorganization Act in force from 1 November. |- | rowspan="2" |1962 | |War over disputed territory of Kashmir with China. |- | |India seizes Diu, Daman and Goa from Portuguese India. |- |1964 |27 May |Death of Prime Minister Jawaharlal Nehru. |- |1965 |6–23 September |Second war with Pakistan over Kashmir. |- | rowspan="2" |1966 |11 January |Prime Minister Lal Bahadur Shastri's mysterious death in Tashkent. |- |24 January |Nehru's daughter Indira Gandhi becomes prime minister. |- | rowspan="2" |1969 |19 July |Nationalisation of 14 major private Banks. |- |15 August |Indian Space Research Organisation formed under Department of Space. |- | rowspan="2" |1971 |3–16 December |Third war with Pakistan, culminating in the creation of Bangladesh |- | |Twenty-year treaty of friendship signed with Soviet Union. |- |1974 |18 May |India Smiling Buddha first nuclear device in underground test. |- | rowspan="2" |1975 |15 May |Sikkim becomes part of Indian Union after a referendum in the Sikkim Assembly. |- |25 June |Indira Gandhi declares a state of emergency after being found guilty of electoral malpractice. Nearly 1,000 political opponents imprisoned and programme of compulsory birth control introduced. (to 1977) |- |1977 | |Indira Gandhi's Congress Party loses general elections. Janata Party comes to power. The Communist Party of India (Marxist) comes into power in West Bengal. |- |1979 | |The Janata Party splits. Chaudhary Charan Singh becomes Prime Minister. |- |1980 | |Indira Gandhi returns to power heading the Congress party splinter group, Congress (Indira). |- |1983 | |N. T. Rama Rao NTR's nine-month-old Telugu Desam assumes power in AP becoming a challenger post Loknayak Jayprakash Narayan against Indira Gandhi. |- |1983 | |India won World Cup for the first time, in one day international Cricket led by Kapil Dev. |- | rowspan="3" |1984 | |Troops storm Golden Temple, the Sikhs' most holy shrine, after Jarnail Singh Bhindranwale seeks refuge inside. There are a movement to flush out Sikh separatism and calls for secularism, called Operation Blue Star. "Anti-Sikh Riots 1984". |- | |Indira Gandhi is assassinated by her Sikh bodyguards; her son, Rajiv, takes over. |- | |Many Sikhs were killed due to the assassination of Indira Gandhi. ''see 1984 anti-Sikh riots.'' |- |1987 | |India deploys troops for peacekeeping operation in Sri Lanka's ethnic conflict. |- |1988 | |SEBI was established by The Government of India on 12 April 1988 and given statutory powers in 1992 with SEBI Act 1992 being passed by the Indian Parliament. |- |1989 | |Falling public support leads to a Congress defeat in general election. |- |1989 | |The National Front (India), headed by V. P. Singh and led by Janata Dal, is formed and storms into power with outside support from BJP and CPI(M). |- |1990 | |Muslim separatist groups begin campaign of violence against Hindus in Kashmir resulting in Exodus of Kashmiri Hindus. |- | rowspan="2" |1991 | |Rajiv Gandhi is assassinated by a suicide bomber sympathetic to Sri Lanka's Tamil Tigers. |- | |An economic reform programme or Economic liberalisation in India is begun by Prime Minister P. V. Narasimha Rao. |- | rowspan="2" |1992 | |Babri Mosque in Ayodhya is demolished, triggering widespread Hindu-Muslim violence. |- | |Over 200 people die in Cuttack in Odisha, after drinking illegally brewed liquor in the 1992 Odisha liquor deaths incident. |- |1995 |July |West Bengal Chief Minister Jyoti Basu made the first call from Kolkata to inaugurate the cellular services in India. |- |1996 | |Congress suffers its worst electoral defeat ever as BJP emerges as the largest single party. |- |1996 |August |The Amarnath Yatra tragedy in which at least 194 pilgrims are reported to have frozen to death in northern Kashmir after being stranded by violent rain and snow storms. |- | rowspan="2" |1998 | |BJP forms coalition government under Prime Minister Atal Bihari Vajpayee. |- | |India and Pakistan carry out nuclear tests, leading to widespread international condemnation. |- | rowspan="3" |1999 |February |Vajpayee makes a historic bus trip to Pakistan to meet Premier Nawaz Sharif and to sign bilateral Lahore peace declaration. |- |May |Indian Army launches operations to evict Pakistani forces occupying Indian positions on the icy heights in Kargil district, known as the Kargil War. |- |October |The Cyclone devastates eastern state of Odisha, leaving at least 10,000 dead. |- | rowspan="3" |2000 |March |US President Bill Clinton makes a groundbreaking visit to improve ties. |- |May |India marks the birth of its billionth citizen. |- |November |The states of Jharkhand, Chhattisgarh and Uttarakhand were created on 15 November 2000. |} === 21st century === {| class="wikitable" !Year !Date !Event |- | rowspan="9" |2001 |26 January |The 7.7 M<sub>w</sub>  Gujarat earthquake shakes Western India with a maximum Mercalli intensity of X (''Extreme''), leaving 13,805–20,023 dead and about 166,800 injured. |- |July |Vajpayee meets Pakistani President Pervez Musharraf in the first summit between the two neighbours in more than two years. The meeting ends without a breakthrough or even a joint statement because of differences over Kashmir. |- |July |Vajpayee's BJP party declines his offer to resign over a number of political scandals and the apparent failure of his talks with Pakistani President Musharraf. |- |September |US lifts sanctions which it imposed against India and Pakistan after they staged nuclear tests in 1998. The move is seen as a reward for their support for the US-led anti-terror campaign. |- |October |India and Pakistan fire at each other's military posts in the heaviest firing along the dividing line of control in Kashmir for almost a year. |- |October |Pakistani forces shelled the village of Arnia about three km (two miles) from the border in the early hours of Monday 6 June, killing five and wounding at least two dozen civilians. |- |December |Suicide squad attacks parliament in New Delhi, killing several police. The five gunmen die in the assault. |- |December |India imposes sanctions against Pakistan, to force it to take action against two Kashmir militant groups blamed for the suicide attack on parliament. Pakistan retaliates with similar sanctions, and bans the groups in January. |- |December |India, Pakistan mass troops on common border amid mounting fears of a looming war. |- | rowspan="6" |2002 | |War of words between Indian and Pakistani leaders intensifies. Actual war seems imminent. |- |January |India successfully test-fires a nuclear-capable ballistic missile – the Agni – off its eastern coast. |- |February |Inter-religious bloodshed breaks out after 59 Hindu pilgrims returning from Ayodhya are killed in a train fire in Godhra, Gujarat. More than 1,000 people, die in subsequent riots. (Police and officials blamed the fire on a Muslim mob; a 2005 government investigation said it was an accident, though later court and SIT report held Muslim mob responsible.) |- |May |Pakistan test-fires three medium-range surface-to-surface Ghauri missiles, which are capable of carrying nuclear warheads. |- |June |UK, US urge their citizens to leave India and Pakistan, while maintaining diplomatic offensive to avert war. |- |July |Retired scientist and architect of India's missile programme A. P. J. Abdul Kalam is elected president. |- | rowspan="3" |2003 |August |At least 50 people are killed in two simultaneous bomb blasts in Bombay. |- |November |India matches Pakistan's declaration of a Kashmir ceasefire. |- |December |India, Pakistan agree to resume direct air links and to allow overflights. |- | rowspan="5" |2004 |January |Groundbreaking meeting is held between government and moderate Kashmir separatists. |- |May |Surprise victory for Congress Party in general elections. Manmohan Singh is sworn in as prime minister. |- |September |India, along with Brazil, Germany and Japan, launches an application for a permanent seat on the UN Security Council. |- |November |India begins to withdraw some of its troops from Kashmir. |- |December |Thousands are killed when tsunami, caused by the 2004 Indian Ocean earthquake off the Indonesian coast, devastate coastal communities in the south and in the Andaman and Nicobar Islands. |- | rowspan="2" |2005 |July |More than 1,000 people are killed in floods and landslides caused by monsoon rains in Mumbai (Bombay) and Maharashtra region. |- |8 October |The 7.6 M<sub>w</sub>  Kashmir earthquake strikes with a maximum Mercalli intensity of VIII (''Severe''), leaving 86,000–87,351 people dead, 69,000–75,266 injured, and 2.8 million homeless. |- | rowspan="2" |2006 |February |India's largest-ever rural jobs scheme is launched, aimed at lifting around 60 million families out of poverty. |- |March |US and India sign a nuclear agreement during a visit by US President George W. Bush. The US gives India access to civilian nuclear technology while India agrees to greater scrutiny for its nuclear programme. |- | rowspan="8" |2007 |February |India and Pakistan sign an agreement aimed at reducing the risk of accidental nuclear war. |- |18 February |68 passengers, most of them Pakistanis, are killed by bomb blasts and a blaze on a train travelling from New Delhi to the Pakistani city of Lahore. |- |March |Maoist rebels in Chhattisgarh state kill more than 50 policemen in a dawn attack. |- |April |India's first commercial space rocket is launched, carrying an Indian satellite. |- |May |Government announces its strongest economic growth figures for 20 years – 9.4% in the year to March. |- |May |At least nine people are killed in a bomb explosion at the main mosque in Hyderabad. Several others are killed in subsequent rioting. |- |July |India says the number of its people with HIV or AIDS is about half of earlier official tallies. Health ministry figures put the total at between 2 million and 3.1 million cases, compared with previous estimates of more than 5 million. |- |25 July |Pratibha Patil becomes first woman to be elected president of India |- | rowspan="5" |2008 |July |Series of explosions kills 49 in Ahmedabad, in Gujarat state. The little-known terrorist group Indian Mujahideen claims responsibility. |- |October |Following approval by the US Congress, President George W. Bush signs into law a nuclear deal with India, which ends a three-decade ban on US nuclear trade with Delhi. |- |October |India successfully launches its first mission to the moon, the uncrewed lunar probe Chandrayaan-1. |- |November |The 2008 Mumbai attacks (often called the 26/11 attacks) kill 174 people, including 9 of the 10 terrorists from Lashkar-e-Taiba, an Islamic terrorist organisation based in Pakistan. India decides not to attack Pakistan in retaliation. |- |December |India announces "pause" in peace process with Pakistan. Indian cricket team cancels planned tour of Pakistan. |- | rowspan="3" |2009 |February |India and Russia sign deals worth $700 million, according to which Moscow will supply Uranium to Delhi. |- |May |Resounding general election victory gives governing Congress-led alliance of PM Manmohan Singh an enhanced position in parliament, only 11 seats short of an absolute majority. |- |July |Delhi court decriminalizes gay sex |- | rowspan="1" |2010 |13 February |16 people are killed in a bomb explosion at German Bakery in the city of Pune, Maharashtra. |- | rowspan="2" |2011 |2 April |India wins cricket world cup after 28 years under the captaincy of Mahendra Singh Dhoni. |- |13 May |After 34 years of Left Front Government, Trinamool Congress and Congress alliance come to power in West Bengal. |- | rowspan="1" |2012 |25 July |Pranab Mukherjee, the former Finance Minister is elected as the 13th president of India. |- | rowspan="3" |2013 |12 February |Indian helicopter bribery scandal comes to light. |- |21 February |Terror attacks in Hyderabad in Dilsukhnagar area. |- |5 November |Mars Orbiter Mission, is successfully launched into Mars orbit by the Indian Space Research Organisation (ISRO). |- | rowspan="2" |2014 |16 May |Narendra Modi elected as prime minister of India, Congress was routed in the general elections. |- |2 June |Telangana, The state of Telangana was officially formed on 2 June 2014. |- | rowspan="5" |2016 |2–5 January |Terror Attacks on Pathankot Air Base. |- |27 June |India becomes a member of Missile Technology Control Regime. |- |27 September |India launches its first space laboratory Astrosat in its biggest project since its Mars orbiter mission in 2014. |- |23 September |India signs a billion-dollar defence deal with France to buy 36 Rafale fighter jets. |- |8 November |In a surprise announcement, the government withdraws high denomination notes from circulation causing chaotic scenes at banks across the country as customers try to exchange old notes. |- | rowspan="1" |2017 |30 June |The Goods and Services Tax (GST) launched, the biggest tax reform in history of India. |- | rowspan="6" |2019 |14 February |A convoy of vehicles carrying Central Reserve Police Force (CRPF) personnel on the Jammu–Srinagar National Highway was attacked by a vehicle-borne suicide bomber in the Pulwama district, Jammu and Kashmir, India. |- |26 February |The 2019 Balakot airstrike was conducted by India, when Indian warplanes crossed the de facto border in the disputed region of Kashmir, and dropped bombs in the vicinity of the town of Balakot in Khyber Pakhtunkhwa province in Pakistan. |- |27 February |The 2019 Balakot strike from Indian side was given a reply named "Swift Retort". After a dog fight between Pakistani and Indian Fighter Pilots. Indian Wing Commander Abhinandan Varthaman was captured by the Pakistani side. However acting to the pressure of various global leaders and bound by the Vienna Convention. Pakistan was Forced to release the Indian Pilot with all due respect. |- |22 May |Narendra Modi gets re-elected as the Prime Minister of India. |- |5 August |The state of Jammu and Kashmir divided into two separate union territories known as Jammu Kashmir and Ladakh by scrapping of Article 370 of the Constitution of India. |- |11 December |The Citizenship (Amendment) Act, 2019 was passed by the Parliament of India on 11 December 2019. It amended the Citizenship Act of 1955 by providing a path to Indian citizenship for members of Hindu, Sikh, Buddhiist, Jain, Parsi, and Christian religious minorities, who had fled persecution from Pakistan, Bangladesh and Afghanistan before December 2014. |- |2020 |30 January |The first COVID-19 case of the country was reported in Kerala's Thrissur district. |- |2021 |12 May |COVID-19 pandemic in India: The country's death toll exceeds 250,000. Delhi cremation grounds were running out of places while hundreds of bodies were reported washed up on the banks of the Ganges. |- | rowspan="2" |2022 |18 July |Droupadi Murmu is elected as President of India, making her the first tribal woman and youngest person to the office. |- |30 October |The collapse of a suspension bridge in Gujarat, leaves at least 135 dead. |- | rowspan="5" |2023 |2 June |A train collision in Odisha results in at least 296 deaths and more than 1,200 others injured. |- |3 July |Indian oil refiners start payments for Russian oil imports in Chinese yuan as an alternative to the US dollar due to increasing sanctions against Russia. |- |23 August |Chandrayaan-3 becomes the first spacecraft to land near the south pole of the Moon, carrying a lunar lander named Vikram and a lunar rover named Pragyan. |- |2 September |The Indian Space Research Organisation (ISRO) successfully launches Aditya-L1, India's first solar observation mission. |- |19 November |Australia defeats India and wins the 2023 Cricket World Cup. |} 17fbb28d2775f79313618440b969acc0cad36cf9 Kuru Kingdom 0 668 1361 2024-03-17T16:47:11Z 80.5.18.102 0 Created page with "'''Kuru''' was a Vedic Indo-Aryan tribal union (later kingdom) in northern Iron Age India, encompassing parts of the modern-day states of Haryana, Delhi, and some parts of western Uttar Pradesh, which appeared in the Middle Vedic period (<abbr>c.</abbr> 1200 – c. 900 BCE). The Kuru Kingdom was the first recorded state-level society in the Indian subcontinent. The Kuru kingdom decisively changed the religious heritage of the early Vedic period, arranging their ritu..." wikitext text/x-wiki '''Kuru''' was a Vedic Indo-Aryan tribal union (later kingdom) in northern Iron Age India, encompassing parts of the modern-day states of Haryana, Delhi, and some parts of western Uttar Pradesh, which appeared in the Middle Vedic period (<abbr>c.</abbr> 1200 – c. 900 BCE). The Kuru Kingdom was the first recorded state-level society in the Indian subcontinent. The Kuru kingdom decisively changed the religious heritage of the early Vedic period, arranging their ritual hymns into collections called the Vedas, and developing new rituals that gained their position over Indian civilization, as the Srauta rituals, which contributed to the so-called "classical synthesis" or "Hindu synthesis". It became the dominant political and cultural centre of the middle Vedic Period during the reigns of Parikshit and Janamejaya, but declined in importance during the late Vedic period (<abbr>c.</abbr> 900 – c. 500 BCE) and had become "something of a backwater" by the Mahajanapada period in the 5th century BCE. However, traditions and legends about the Kurus continued into the post-Vedic period, providing the basis for the Mahabharata epic. The main contemporary sources for understanding the Kuru kingdom are the Vedas, containing details of life during this period and allusions to historical persons and events. The time frame and geographical extent of the Kuru kingdom (as determined by philological study of the Vedic literature) suggest its correspondence with the archaeological Painted Grey Ware culture. == Location == The Kuru state was located in northwestern India, stretching from the [[Gaṅgā]] river and the border of the Pañcāla state in the east to the Sarasvatī and the frontier of Rohītaka in the west, and bordered the Kulindas in the north and the Sūrasenas and Matsya in the south. The area formerly occupied by the Kuru kingdom covered the presently Thanesar, Delhi, and most of the upper Gangetic Doab. The Kuru state was itself divided into the Kuru-jaṅgala ("Kuru forest"), the Kuru territory proper, and the Kuru-kṣetra ("Kuru field"): * Kuru-jaṅgala was a wild area which stretched from the Kāmyaka forest on the banks of the Sarasvatī to the Khāṇḍava forest * proper Kuru territory consisted of the region around Hāstīnapura * Kuru-kṣetra was located between the Khāṇḍava forest in the south, Tūrghna in the north, and Parīnaḥ in the west. Kuru-kṣetra was between the Sarasvatī and the Dṛṣadvatī rivers The rivers flowing within the Kuru state included the Aruṇā, Aṃśumatī, Hiraṇvatī, Āpayā, Kauśikī, Sarasvatī, and Dṛṣadvatī or Rakṣī. == History == The Kuru clan was formed in the Middle Vedic period (<abbr>c.</abbr> 1200 – c. 900 BCE) as a result of the alliance and merger between the Bharata and other Puru clans, in the aftermath of the Battle of the Ten Kings. With their centre of power in the Kurukshetra region, the Kurus formed the first political centre of the Vedic period and were dominant roughly from 1200 to 800 BCE. The first Kuru capital was at Āsandīvat, identified with modern Assandh in Haryana. Later literature refers to Indraprastha (identified with modern Delhi) and Hastinapura as the main Kuru cities. The Kurus figure prominently in Vedic literature after the time of the Rigveda. The Kurus here appear as a branch of the early Indo-Aryans, ruling the Ganga-Yamuna Doab and modern Haryana. The focus in the later Vedic period shifted out of Punjab, into the Haryana and the Doab, and thus to the Kuru clan. This trend corresponds to the increasing number and size of Painted Grey Ware (PGW) settlements in the Haryana and Doab areas. Archaeological surveys of the Kurukshetra District have revealed a more complex (albeit not yet fully urbanized) three-tiered hierarchy for the period of the period from 1000 to 600 BCE, suggesting a complex chiefdom or emerging early state, contrasting with the two-tiered settlement pattern (with some "modest central places", suggesting the existence of simple chiefdoms) in the rest of the Ganges Valley. Although most PGW sites were small farming villages, several PGW sites emerged as relatively large settlements that can be characterized as towns; the largest of these were fortified by ditches or moats and embankments made of piled earth with wooden palisades, albeit smaller and simpler than the elaborate fortifications which emerged in large cities after 600 BCE. The Atharvaveda (XX.127) praises Parikshit, the "King of the Kurus", as the great ruler of a thriving, prosperous realm. Other late Vedic texts, such as the Shatapatha Brahmana, commemorate Parikshit's son Janamejaya as a great conqueror who performed the ashvamedha (horse-sacrifice). These two Kuru kings played a decisive role in the consolidation of the Kuru state and the development of the srauta rituals, and they also appear as important figures in later legends and traditions (e.g., in the Mahabharata). The Kurus declined after being defeated by the non-Vedic Salva (or Salvi) tribe, and the centre of Vedic culture shifted east, into the Panchala realm, in Uttar Pradesh (whose king Keśin Dālbhya was the nephew of the late Kuru king). According to post-Vedic Sanskrit literature, the capital of the Kurus was later transferred to Kaushambi, in the lower Doab, after Hastinapur was destroyed by floods as well as because of upheavals in the Kuru family itself. In the post-Vedic period (by the 6th century BCE), the Kuru dynasty evolved into Kuru and Vatsa janapadas, ruling over Upper Doab/Delhi/Haryana and lower Doab, respectively. The Vatsa branch of the Kuru dynasty was further divided into branches at Kaushambi and at Mathura. According to Buddhist sources, by the late and post-Vedic periods, Kuru had become a minor state ruled by a chieftain called Koravya and belonging to the ''Yuddhiṭṭhila'' (''Yudhiṣṭhira'') ''gotta''. After the main Kuru ruling dynasty had moved to Kosambi, the Kuru country itself became divided into multiple small principalities, with the ones at Indapatta and one at Iṣukāra being the most prominent ones. By the time of the Buddha, these small statelets had been replaced by a Kuru ''gaṇasaṅgha'' (republican state). == Society and Administration == === Society === The tribes that consolidated into the Kuru Kingdom or 'Kuru Pradesh' were largely semi-nomadic, pastoral tribes. However, as settlement shifted into the western Ganges Plain, settled farming of rice and barley became more important. Vedic literature of this period indicates the growth of surplus production and the emergence of specialized artisans and craftsmen. Iron was first mentioned as ''śyāma āyasa'' (श्याम आयस, literally "black metal") in the Atharvaveda, a text of this era. Another important development was the fourfold varna (class) system, which replaced the twofold system of arya and dasa from the Rigvedic times. The Brahmin priesthood and Kshatriya aristocracy, who dominated the ''Arya'' commoners (now called vaishyas) and the ''dasa'' labourers (now called shudras), were designated as separate classes. === Administration === Kuru kings ruled with the assistance of a rudimentary administration, including purohita (priest), village headman, army chief, food distributor, emissary, herald and spies. They extracted mandatory tribute (''Bali'') from their population of commoners as well as from weaker neighbouring tribes. They led frequent raids and conquests against their neighbours, especially to the east and south. To aid in governing, the kings and their Brahmin priests arranged Vedic hymns into collections and developed a new set of rituals (the now orthodox Srauta rituals) to uphold social order and strengthen the class hierarchy. High-ranking nobles could perform very elaborate sacrifices, and many poojas (rituals) primarily exalted the status of the king over his people. The ashvamedha or horse sacrifice was a way for a powerful king to assert his domination in northern India. ==== Assembly ==== Kuru had two types of legislative assembly: * The ''Samiti'' was a common assembly of the Jana members, and had the power to elect or dethrone the king. * The ''Sabha'' was a smaller assembly of wise elders, who advised the king. == In epic literature == ''See also: [[Kauravas]] and [[Pandavas]]'' The epic poem, the ''Mahabharata'', tells of a conflict between two branches of the reigning Kuru clan possibly around 1000 BCE. However, archaeology has not furnished conclusive proof as to whether the specific events described have any historical basis. The existing text of the ''Mahabharata'' went through many layers of development and mostly belongs to the period between c. 400 BCE and 400 CE. Within the frame story of the ''Mahabharata'', the historical kings Parikshit and Janamejaya are featured significantly as scions of the Kuru clan. A historical Kuru King named Dhritarashtra Vaichitravirya is mentioned in the Kathaka Samhita of the Yajurveda (<abbr>c.</abbr> 1200–900 BCE) as a descendant of the Rigvedic-era king Sudas. His cattle were reportedly destroyed as a result of conflict with the vratya ascetics; however, this Vedic mention does not provide corroboration for the accuracy of the Mahabharata's account of his reign. === Kuru family tree in Mahabharata === This shows the line of royal and family succession, not necessarily the parentage. See the notes below for detail. 3064f0a9f9855e2809baa9a95ef8528d74a377d1 1365 1361 2024-03-18T09:12:08Z Motzoid India 2 wikitext text/x-wiki '''Kuru''' was a Vedic Indo-Aryan tribal union (later kingdom) in northern Iron Age India, encompassing parts of the modern-day states of Haryana, Delhi, and some parts of western Uttar Pradesh, which appeared in the Middle Vedic period (<abbr>c.</abbr> 1200 – c. 900 BCE). The Kuru Kingdom was the first recorded state-level society in the Indian subcontinent. The Kuru kingdom decisively changed the religious heritage of the early Vedic period, arranging their ritual hymns into collections called the Vedas, and developing new rituals that gained their position over Indian civilization, as the Srauta rituals, which contributed to the so-called "classical synthesis" or "Hindu synthesis". It became the dominant political and cultural centre of the middle Vedic Period during the reigns of Parikshit and Janamejaya, but declined in importance during the late Vedic period (<abbr>c.</abbr> 900 – c. 500 BCE) and had become "something of a backwater" by the Mahajanapada period in the 5th century BCE. However, traditions and legends about the Kurus continued into the post-Vedic period, providing the basis for the Mahabharata epic. The main contemporary sources for understanding the Kuru kingdom are the Vedas, containing details of life during this period and allusions to historical persons and events. The time frame and geographical extent of the Kuru kingdom (as determined by philological study of the Vedic literature) suggest its correspondence with the archaeological Painted Grey Ware culture. == Location == The Kuru state was located in northwestern India, stretching from the [[Gaṅgā]] river and the border of the Pañcāla state in the east to the Sarasvatī and the frontier of Rohītaka in the west, and bordered the Kulindas in the north and the Sūrasenas and Matsya in the south. The area formerly occupied by the Kuru kingdom covered the presently Thanesar, Delhi, and most of the upper Gangetic Doab. The Kuru state was itself divided into the Kuru-jaṅgala ("Kuru forest"), the Kuru territory proper, and the Kuru-kṣetra ("Kuru field"): * Kuru-jaṅgala was a wild area which stretched from the Kāmyaka forest on the banks of the Sarasvatī to the Khāṇḍava forest * proper Kuru territory consisted of the region around Hāstīnapura * Kuru-kṣetra was located between the Khāṇḍava forest in the south, Tūrghna in the north, and Parīnaḥ in the west. Kuru-kṣetra was between the Sarasvatī and the Dṛṣadvatī rivers The rivers flowing within the Kuru state included the Aruṇā, Aṃśumatī, Hiraṇvatī, Āpayā, Kauśikī, Sarasvatī, and Dṛṣadvatī or Rakṣī. == History == The Kuru clan was formed in the Middle Vedic period (<abbr>c.</abbr> 1200 – c. 900 BCE) as a result of the alliance and merger between the Bharata and other Puru clans, in the aftermath of the Battle of the Ten Kings. With their centre of power in the Kurukshetra region, the Kurus formed the first political centre of the Vedic period and were dominant roughly from 1200 to 800 BCE. The first Kuru capital was at Āsandīvat, identified with modern Assandh in Haryana. Later literature refers to Indraprastha (identified with modern Delhi) and Hastinapura as the main Kuru cities. The Kurus figure prominently in Vedic literature after the time of the Rigveda. The Kurus here appear as a branch of the early Indo-Aryans, ruling the Ganga-Yamuna Doab and modern Haryana. The focus in the later Vedic period shifted out of Punjab, into the Haryana and the Doab, and thus to the Kuru clan. This trend corresponds to the increasing number and size of Painted Grey Ware (PGW) settlements in the Haryana and Doab areas. Archaeological surveys of the Kurukshetra District have revealed a more complex (albeit not yet fully urbanized) three-tiered hierarchy for the period of the period from 1000 to 600 BCE, suggesting a complex chiefdom or emerging early state, contrasting with the two-tiered settlement pattern (with some "modest central places", suggesting the existence of simple chiefdoms) in the rest of the Ganges Valley. Although most PGW sites were small farming villages, several PGW sites emerged as relatively large settlements that can be characterized as towns; the largest of these were fortified by ditches or moats and embankments made of piled earth with wooden palisades, albeit smaller and simpler than the elaborate fortifications which emerged in large cities after 600 BCE. The Atharvaveda (XX.127) praises Parikshit, the "King of the Kurus", as the great ruler of a thriving, prosperous realm. Other late Vedic texts, such as the Shatapatha Brahmana, commemorate Parikshit's son Janamejaya as a great conqueror who performed the ashvamedha (horse-sacrifice). These two Kuru kings played a decisive role in the consolidation of the Kuru state and the development of the srauta rituals, and they also appear as important figures in later legends and traditions (e.g., in the Mahabharata). The Kurus declined after being defeated by the non-Vedic Salva (or Salvi) tribe, and the centre of Vedic culture shifted east, into the Panchala realm, in Uttar Pradesh (whose king Keśin Dālbhya was the nephew of the late Kuru king). According to post-Vedic Sanskrit literature, the capital of the Kurus was later transferred to Kaushambi, in the lower Doab, after Hastinapur was destroyed by floods as well as because of upheavals in the Kuru family itself. In the post-Vedic period (by the 6th century BCE), the Kuru dynasty evolved into Kuru and Vatsa janapadas, ruling over Upper Doab/Delhi/Haryana and lower Doab, respectively. The Vatsa branch of the Kuru dynasty was further divided into branches at Kaushambi and at Mathura. According to Buddhist sources, by the late and post-Vedic periods, Kuru had become a minor state ruled by a chieftain called Koravya and belonging to the ''Yuddhiṭṭhila'' (''Yudhiṣṭhira'') ''gotta''. After the main Kuru ruling dynasty had moved to Kosambi, the Kuru country itself became divided into multiple small principalities, with the ones at Indapatta and one at Iṣukāra being the most prominent ones. By the time of the Buddha, these small statelets had been replaced by a Kuru ''gaṇasaṅgha'' (republican state). == Society and Administration == === Society === The tribes that consolidated into the Kuru Kingdom or 'Kuru Pradesh' were largely semi-nomadic, pastoral tribes. However, as settlement shifted into the western Ganges Plain, settled farming of rice and barley became more important. Vedic literature of this period indicates the growth of surplus production and the emergence of specialized artisans and craftsmen. Iron was first mentioned as ''śyāma āyasa'' (श्याम आयस, literally "black metal") in the Atharvaveda, a text of this era. Another important development was the fourfold varna (class) system, which replaced the twofold system of arya and dasa from the Rigvedic times. The Brahmin priesthood and Kshatriya aristocracy, who dominated the ''Arya'' commoners (now called vaishyas) and the ''dasa'' labourers (now called shudras), were designated as separate classes. === Administration === Kuru kings ruled with the assistance of a rudimentary administration, including purohita (priest), village headman, army chief, food distributor, emissary, herald and spies. They extracted mandatory tribute (''Bali'') from their population of commoners as well as from weaker neighbouring tribes. They led frequent raids and conquests against their neighbours, especially to the east and south. To aid in governing, the kings and their Brahmin priests arranged Vedic hymns into collections and developed a new set of rituals (the now orthodox Srauta rituals) to uphold social order and strengthen the class hierarchy. High-ranking nobles could perform very elaborate sacrifices, and many poojas (rituals) primarily exalted the status of the king over his people. The ashvamedha or horse sacrifice was a way for a powerful king to assert his domination in northern India. ==== Assembly ==== Kuru had two types of legislative assembly: * The ''Samiti'' was a common assembly of the Jana members, and had the power to elect or dethrone the king. * The ''Sabha'' was a smaller assembly of wise elders, who advised the king. == In epic literature == ''See also: [[Kauravas]] and [[Pandavas]]'' The epic poem, the ''Mahabharata'', tells of a conflict between two branches of the reigning Kuru clan possibly around 1000 BCE. However, archaeology has not furnished conclusive proof as to whether the specific events described have any historical basis. The existing text of the ''Mahabharata'' went through many layers of development and mostly belongs to the period between c. 400 BCE and 400 CE. Within the frame story of the ''Mahabharata'', the historical kings Parikshit and Janamejaya are featured significantly as scions of the Kuru clan. A historical Kuru King named Dhritarashtra Vaichitravirya is mentioned in the Kathaka Samhita of the Yajurveda (<abbr>c.</abbr> 1200–900 BCE) as a descendant of the Rigvedic-era king Sudas. His cattle were reportedly destroyed as a result of conflict with the vratya ascetics; however, this Vedic mention does not provide corroboration for the accuracy of the Mahabharata's account of his reign. === Kuru family tree in Mahabharata === This shows the line of royal and family succession, not necessarily the parentage. See the notes below for detail. [[Category:Indian History]] 03781c242fce496e3fe704c99f4ed96cdc030615 Google books 0 611 1363 1247 2024-03-18T09:07:43Z Motzoid India 2 wikitext text/x-wiki '''Google Books''' (previously known as '''Google Book Search''', '''Google Print''', and by its code-name '''Project Ocean''') is a service from Google that searches the full text of books and magazines that Google has scanned, converted to text using optical character recognition (OCR), and stored in its digital database. Books are provided either by publishers and authors through the Google Books Partner Program, or by Google's library partners through the Library Project. Additionally, Google has partnered with a number of magazine publishers to digitize their archives. The Publisher Program was first known as Google Print when it was introduced at the Frankfurt Book Fair in October 2004. The Google Books Library Project, which scans works in the collections of library partners and adds them to the digital inventory, was announced in December 2004. The Google Books initiative has been hailed for its potential to offer unprecedented access to what may become the largest online body of human knowledge and promoting the democratization of knowledge. However, it has also been criticized for potential copyright violations, and lack of editing to correct the many errors introduced into the scanned texts by the OCR process. As of October 2019, Google celebrated 15 years of Google Books and provided the number of scanned books as more than 40 million titles. Google estimated in 2010 that there were about 130 million distinct titles in the world, and stated that it intended to scan all of them. However, the scanning process in American academic libraries has slowed since the 2000s. Google Book's scanning efforts have been subject to litigation, including ''Authors Guild v. Google'', a class-action lawsuit in the United States, decided in Google's favor (see below). This was a major case that came close to changing copyright practices for orphan works in the United States. A 2023 study by scholars from the University of California, Berkeley and Northeastern University's business schools found that Google Books's digitization of books has led to increased sales for the physical versions of the books. == Details == Results from Google Books show up in both the universal Google Search and in the dedicated Google Books search website (''books.google.com''). In response to search queries, Google Books allows users to view full pages from books in which the search terms appear if the book is out of copyright or if the copyright owner has given permission. If Google believes the book is still under copyright, a user sees "snippets" of text around the queried search terms. All instances of the search terms in the book text appear with a yellow highlight. The four access levels used on Google Books are: * '''Full view''': Books in the public domain are available for "full view" and can be downloaded for free. In-print books acquired through the Partner Program are also available for full view if the publisher has given permission, although this is rare. * '''Preview''': For in-print books where permission has been granted, the number of viewable pages is limited to a "preview" set by a variety of access restrictions and security measures, some based on user-tracking. Usually, the publisher can set the percentage of the book available for preview. Users are restricted from copying, downloading or printing book previews. A watermark reading "Copyrighted material" appears at the bottom of pages. All books acquired through the Partner Program are available for preview. * '''Snippet view''': A "snippet view" – two to three lines of text surrounding the queried search term – is displayed in cases where Google does not have permission of the copyright owner to display a preview. This could be because Google cannot identify the owner or the owner declined permission. If a search term appears many times in a book, Google displays no more than three snippets, thus preventing the user from viewing too much of the book. Also, Google does not display any snippets for certain reference books, such as dictionaries, where the display of even snippets can harm the market for the work. Google maintains that no permission is required under copyright law to display the snippet view. * '''No preview''': Google also displays search results for books that have not been digitized. As these books have not been scanned, their text is not searchable and only the metadata such as the title, author, publisher, number of pages, ISBN, subject and copyright information, and in some cases, a table of contents and book summary is available. In effect, this is similar to an online library card catalog. In response to criticism from groups such as the American Association of Publishers and the Authors Guild, Google announced an opt-out policy in August 2005, through which copyright owners could provide a list of titles that they do not want scanned, and the request would be respected. The company also stated that it would not scan any in-copyright books between August and 1 November 2005, to provide the owners with the opportunity to decide which books to exclude from the Project. Thus, copyright owners have three choices with respect to any work: # It can participate in the Partner Program to make a book available for preview or full view, in which case it would share revenue derived from the display of pages from the work in response to user queries. # It can let Google scan the book under the Library Project and display snippets in response to user queries. # It can opt out of the Library Project, in which case Google will not scan the book. If the book has already been scanned, Google will reset its access level as 'No preview'. Most scanned works are no longer in print or commercially available. In addition to procuring books from libraries, Google also obtains books from its publisher partners, through the "Partner Program" – designed to help publishers and authors promote their books. Publishers and authors submit either a digital copy of their book in EPUB or PDF format, or a print copy to Google, which is made available on Google Books for preview. The publisher can control the percentage of the book available for preview, with the minimum being 20%. They can also choose to make the book fully viewable, and even allow users to download a PDF copy. Books can also be made available for sale on Google Play. Unlike the Library Project, this does not raise any copyright concerns as it is conducted pursuant to an agreement with the publisher. The publisher can choose to withdraw from the agreement at any time. For many books, Google Books displays the original page numbers. However, Tim Parks, writing in ''The New York Review of Books'' in 2014, noted that Google had stopped providing page numbers for many recent publications (likely the ones acquired through the Partner Program) "presumably in alliance with the publishers, in order to force those of us who need to prepare footnotes to buy paper editions." == Scanning of books == The project began in 2002 under the codename Project Ocean. Google co-founder Larry Page had always had an interest in digitizing books. When he and Marissa Mayer began experimenting with book scanning in 2002, it took 40 minutes for them to digitize a 300-page book. But soon after the technology had been developed to the extent that scanning operators could scan up to 6000 pages an hour. Google established designated scanning centers to which books were transported by trucks. The stations could digitize at the rate of 1,000 pages per hour. The books were placed in a custom-built mechanical cradle that adjusted the book spine in place while an array of lights and optical instruments scanned the two open pages. Each page would have two cameras directed at it capturing the image, while a range finder LIDAR overlaid a three-dimensional laser grid on the book's surface to capture the curvature of the paper. A human operator would turn the pages by hand, using a foot pedal to take the photographs. With no need to flatten the pages or align them perfectly, Google's system not only reached a remarkable efficiency and speed but also helped protect the fragile collections from being over-handled. Afterwards, the crude images went through three levels of processing: first, de-warping algorithms used the LIDAR data fix the pages' curvature. Then, optical character recognition (OCR) software transformed the raw images into text, and, lastly, another round of algorithms extracted page numbers, footnotes, illustrations and diagrams. Many of the books are scanned using a customized Elphel 323 camera at a rate of 1,000 pages per hour. A patent awarded to Google in 2009 revealed that Google had come up with an innovative system for scanning books that uses two cameras and infrared light to automatically correct for the curvature of pages in a book. By constructing a 3D model of each page and then "de-warping" it, Google is able to present flat-looking pages without having to really make the pages flat, which requires the use of destructive methods such as unbinding or glass plates to individually flatten each page, which is inefficient for large scale scanning. Google decided to omit color information in favour of better spatial resolution, as most out-of-copyright books at the time did not contain colors. Each page image was passed through algorithms that distinguished the text and illustration regions. Text regions were then processed via OCR to enable full-text searching. Google expended considerable resources in coming up with optimal compression techniques, aiming for high image quality while keeping the file sizes minimal to enable access by internet users with low bandwidth. == Website functionality == For each work, Google Books automatically generates an overview page. This page displays information extracted from the book—its publishing details, a high frequency word map, the table of contents—as well as secondary material, such as summaries, reader reviews (not readable in the mobile version of the website), and links to other relevant texts. A visitor to the page, for instance, might see a list of books that share a similar genre and theme, or they might see a list of current scholarship on the book. This content, moreover, offers interactive possibilities for users signed into their Google account. They can export the bibliographic data and citations in standard formats, write their own reviews, add it to their library to be tagged, organized, and shared with other people. Thus, Google Books collects these more interpretive elements from a range of sources, including the users, third-party sites like Goodreads, and often the book's author and publisher. In fact, to encourage authors to upload their own books, Google has added several functionalities to the website. The authors can allow visitors to download their ebook for free, or they can set their own purchase price. They can change the price back and forth, offering discounts whenever it suits them. Also, if a book's author chooses to add an ISBN, LCCN or OCLC record number, the service will update the book's url to include it. Then, the author can set a specific page as the link's anchor. This option makes their book more easily discoverable. d02478ec6f776594906771103f56dbf49c4ad8fb Indus Valley Civilisation 0 24 1366 30 2024-03-18T09:12:26Z Motzoid India 2 wikitext text/x-wiki The '''Indus Valley Civilisation''' ('''IVC'''), also known as the '''Indus Civilisation''', was a Bronze Age civilisation in the northwestern regions of South Asia, lasting from 3300 BCE to 1300 BCE, and in its mature form 2600 BCE to 1900 BCE. Together with ancient Egypt and Mesopotamia, it was one of three early civilisations of the Near East and South Asia, and of the three, the most widespread, its sites spanning an area from much of Pakistan, to northeast Afghanistan, and northwestern India. The civilisation flourished both in the alluvial plain of the Indus River, which flows through the length of Pakistan, and along a system of perennial monsoon-fed rivers that once coursed in the vicinity of the Ghaggar-Hakra, a seasonal river in northwest India and eastern Pakistan. The term ''Harappan'' is sometimes applied to the Indus civilisation after its type site Harappa, the first to be excavated early in the 20th century in what was then the Punjab province of British India and is now Punjab, Pakistan. The discovery of Harappa and soon afterwards Mohenjo-daro was the culmination of work that had begun after the founding of the Archaeological Survey of India in the British Raj in 1861. There were earlier and later cultures called Early Harappan and Late Harappan in the same area. The early Harappan cultures were populated from Neolithic cultures, the earliest and best-known of which is named after Mehrgarh, in Balochistan, Pakistan. Harappan civilisation is sometimes called ''Mature Harappan'' to distinguish it from the earlier cultures. The cities of the ancient Indus were noted for their urban planning, baked brick houses, elaborate drainage systems, water supply systems, clusters of large non-residential buildings, and techniques of handicraft and metallurgy. Mohenjo-daro and Harappa very likely grew to contain between 30,000 and 60,000 individuals, and the civilisation may have contained between one and five million individuals during its florescence. A gradual drying of the region during the 3rd millennium BCE may have been the initial stimulus for its urbanisation. Eventually it also reduced the water supply enough to cause the civilisation's demise and to disperse its population to the east. Although over a thousand Mature Harappan sites have been reported and nearly a hundred excavated, there are five major urban centres: Mohenjo-daro in the lower Indus Valley (declared a UNESCO World Heritage Site in 1980 as "''Archaeological Ruins at Moenjodaro''"), Harappa in the western Punjab region, Ganeriwala in the Cholistan Desert, Dholavira in western Gujarat (declared a UNESCO World Heritage Site in 2021 as "''Dholavira: A Harappan City''"), and Rakhigarhi in Haryana. The Harappan language is not directly attested, and its affiliations are uncertain, as the Indus script has remained undeciphered. A relationship with the Dravidian or Elamo-Dravidian language family is favoured by a section of scholars. == Etymology == The Indus civilisation is named after the Indus river system in whose alluvial plains the early sites of the civilisation were identified and excavated. Following a tradition in archaeology, the civilisation is sometimes referred to as the ''Harappan,'' after its type site, Harappa, the first site to be excavated in the 1920s; this is notably true of usage employed by the Archaeological Survey of India after India's independence in 1947. The term "Ghaggar-Hakra" figures prominently in modern labels applied to the Indus civilisation on account of a good number of sites having been found along the Ghaggar-Hakra River in northwest India and eastern Pakistan. The terms "Indus-Sarasvati Civilisation" and "Sindhu-Saraswati Civilisation" have also been employed in the literature after a posited identification of the Ghaggar-Hakra with the river Sarasvati described in the early chapters of ''Rigveda'', a collection of hymns in archaic Sanskrit composed in the second-millennium BCE. Recent geophysical research suggests that unlike the Sarasvati, described in the ''Rigveda'' as a snow-fed river, the Ghaggar-Hakra was a system of perennial monsoon-fed rivers, which became seasonal around the time that the civilisation diminished, approximately 4,000 years ago. == Pre-Harappan era: Mehrgarh == Mehrgarh is a Neolithic (7000 BCE to <abbr>c.</abbr> 2500 BCE) mountain site in the Balochistan province of Pakistan, which gave new insights on the emergence of the Indus Valley Civilisation. Mehrgarh is one of the earliest sites with evidence of farming and herding in South Asia. Mehrgarh was influenced by the Near Eastern Neolithic, with similarities between "domesticated wheat varieties, early phases of farming, pottery, other archaeological artefacts, some domesticated plants and herd animals." Jean-Francois Jarrige argues for an independent origin of Mehrgarh. Jarrige notes "the assumption that farming economy was introduced full-fledged from Near-East to South Asia," and the similarities between Neolithic sites from eastern Mesopotamia and the western Indus valley, which are evidence of a "cultural continuum" between those sites. But given the originality of Mehrgarh, Jarrige concludes that Mehrgarh has an earlier local background, and is not a "'backwater' of the Neolithic culture of the Near East". Lukacs and Hemphill suggest an initial local development of Mehrgarh, with a continuity in cultural development but a change in population. According to Lukacs and Hemphill, while there is a strong continuity between the neolithic and chalcolithic (Copper Age) cultures of Mehrgarh, dental evidence shows that the chalcolithic population did not descend from the neolithic population of Mehrgarh, which "suggests moderate levels of gene flow." Mascarenhas et al. (2015) note that "new, possibly West Asian, body types are reported from the graves of Mehrgarh beginning in the Togau phase (3800 BCE)." Gallego Romero et al. (2011) state that their research on lactose tolerance in India suggests that "the west Eurasian genetic contribution identified by Reich et al. (2009) principally reflects gene flow from Iran and the Middle East." They further note that "[t]he earliest evidence of cattle herding in south Asia comes from the Indus River Valley site of Mehrgarh and is dated to 7,000 YBP." == Early Harappan == The Early Harappan Ravi Phase, named after the nearby Ravi River, lasted from <abbr>c.</abbr> 3300 BCE until 2800 BCE. It started when farmers from the mountains gradually moved between their mountain homes and the lowland river valleys, and is related to the Hakra Phase, identified in the Ghaggar-Hakra River Valley to the west, and predates the Kot Diji Phase (2800–2600 BCE, Harappan 2), named after a site in northern Sindh, Pakistan, near Mohenjo-daro. The earliest examples of the Indus script date to the 3rd millennium BCE. The mature phase of earlier village cultures is represented by Rehman Dheri and Amri in Pakistan. Kot Diji represents the phase leading up to Mature Harappan, with the citadel representing centralised authority and an increasingly urban quality of life. Another town of this stage was found at Kalibangan in India on the Hakra River. == Mature Harappan == According to Giosan et al. (2012), the slow southward migration of the monsoons across Asia initially allowed the Indus Valley villages to develop by taming the floods of the Indus and its tributaries. Flood-supported farming led to large agricultural surpluses, which in turn supported the development of cities. The IVC residents did not develop irrigation capabilities, relying mainly on the seasonal monsoons leading to summer floods. Brooke further notes that the development of advanced cities coincides with a reduction in rainfall, which may have triggered a reorganisation into larger urban centres. According to J.G. Shaffer and D.A. Lichtenstein, the Mature Harappan civilisation was "a fusion of the Bagor, Hakra, and Kot Diji traditions or 'ethnic groups' in the Ghaggar-Hakra valley on the borders of India and Pakistan". Also, according to a more recent summary by Maisels (2003), "The Harappan oecumene formed from a Kot Dijian/Amri-Nal synthesis". He also says that, in the development of complexity, the site of Mohenjo-daro has priority, along with the Hakra-Ghaggar cluster of sites, "where Hakra wares actually precede the Kot Diji related material". He sees these areas as "catalytic in producing the fusion from Hakra, Kot Dijian and Amri-Nal cultural elements that resulted in the gestalt we recognize as Early Harappan (Early Indus)." By 2600 BCE, the Early Harappan communities turned into large urban centres. Such urban centres include Harappa, Ganeriwala, Mohenjo-daro in modern-day Pakistan, and Dholavira, Kalibangan, Rakhigarhi, Rupar, and Lothal in modern-day India. In total, more than 1,000 settlements have been found, mainly in the general region of the Indus and Ghaggar-Hakra Rivers and their tributaries. === Cities === A sophisticated and technologically advanced urban culture is evident in the Indus Valley Civilisation, making them the first urban centre in the region. The quality of municipal town planning suggests the knowledge of urban planning and efficient municipal governments which placed a high priority on hygiene, or, alternatively, accessibility to the means of religious ritual. As seen in Harappa, Mohenjo-daro and the recently partially excavated Rakhigarhi, this urban plan included the world's first known urban sanitation systems. Within the city, individual homes or groups of homes obtained water from wells. From a room that appears to have been set aside for bathing, waste water was directed to covered drains, which lined the major streets. Houses opened only to inner courtyards and smaller lanes. The housebuilding in some villages in the region still resembles in some respects the housebuilding of the Harappans. The ancient Indus systems of sewerage and drainage that were developed and used in cities throughout the Indus region were far more advanced than any found in contemporary urban sites in the Middle East and even more efficient than those in many areas of Pakistan and India today. The advanced architecture of the Harappans is shown by their dockyards, granaries, warehouses, brick platforms, and protective walls. The massive walls of Indus cities most likely protected the Harappans from floods and may have dissuaded military conflicts. The purpose of the citadel remains debated. In sharp contrast to this civilisation's contemporaries, Mesopotamia and ancient Egypt, no large monumental structures were built. There is no conclusive evidence of palaces or temples. Some structures are thought to have been granaries. Found at one city is an enormous well-built bath (the "Great Bath"), which may have been a public bath. Although the citadels were walled, it is far from clear that these structures were defensive. Most city dwellers appear to have been traders or artisans, who lived with others pursuing the same occupation in well-defined neighbourhoods. Materials from distant regions were used in the cities for constructing seals, beads and other objects. Among the artefacts discovered were beautiful glazed faïence beads. Steatite seals have images of animals, people (perhaps gods), and other types of inscriptions, including the yet un-deciphered writing system of the Indus Valley Civilisation. Some of the seals were used to stamp clay on trade goods. Although some houses were larger than others, Indus civilisation cities were remarkable for their apparent, if relative, egalitarianism. All the houses had access to water and drainage facilities. This gives the impression of a society with relatively low wealth concentration. === Authority and governance === Archaeological records provide no immediate answers for a centre of power or for depictions of people in power in Harappan society. But, there are indications of complex decisions being taken and implemented. For instance, the majority of the cities were constructed in a highly uniform and well-planned grid pattern, suggesting they were planned by a central authority; extraordinary uniformity of Harappan artefacts as evident in pottery, seals, weights and bricks; presence of public facilities and monumental architecture; heterogeneity in the mortuary symbolism and in grave goods (items included in burials). These are some major theories:There was a single state, given the similarity in artefacts, the evidence for planned settlements, the standardised ratio of brick size, and the establishment of settlements near sources of raw material. * There was no single ruler but several cities like Mohenjo-daro had a separate ruler, Harappa another, and so forth. === Metallurgy === Harappans evolved some new techniques in metallurgy and produced copper, bronze, lead, and tin. A touchstone bearing gold streaks was found in Banawali, which was probably used for testing the purity of gold (such a technique is still used in some parts of India). == Late Harappan == Around 1900 BCE signs of a gradual decline began to emerge, and by around 1700 BCE most of the cities had been abandoned. Recent examination of human skeletons from the site of Harappa has demonstrated that the end of the Indus civilisation saw an increase in inter-personal violence and in infectious diseases like leprosy and tuberculosis. According to historian Upinder Singh, "the general picture presented by the late Harappan phase is one of a breakdown of urban networks and an expansion of rural ones." During the period of approximately 1900 to 1700 BCE, multiple regional cultures emerged within the area of the Indus civilisation. The Cemetery H culture was in Punjab, Haryana, and Western Uttar Pradesh, the Jhukar culture was in Sindh, and the Rangpur culture (characterised by Lustrous Red Ware pottery) was in Gujarat. Other sites associated with the Late phase of the Harappan culture are Pirak in Balochistan, Pakistan, and Daimabad in Maharashtra, India. The largest Late Harappan sites are Kudwala in Cholistan in Punjab, Bet Dwarka in Gujarat, and Daimabad in Maharashtra, which can be considered as urban, but they are smaller and few in number compared with the Mature Harappan cities. Bet Dwarka was fortified and continued to have contacts with the Persian Gulf region, but there was a general decrease of long-distance trade. On the other hand, the period also saw a diversification of the agricultural base, with a diversity of crops and the advent of double-cropping, as well as a shift of rural settlement towards the east and the south. The pottery of the Late Harappan period is described as "showing some continuity with mature Harappan pottery traditions", but also distinctive differences. Many sites continued to be occupied for some centuries, although their urban features declined and disappeared. Formerly typical artifacts such as stone weights and female figurines became rare. There are some circular stamp seals with geometric designs, but lacking the Indus script which characterised the mature phase of the civilisation. Script is rare and confined to potsherd inscriptions. There was also a decline in long-distance trade, although the local cultures show new innovations in faience and glass making, and carving of stone beads. Urban amenities such as drains and the public bath were no longer maintained, and newer buildings were "poorly constructed". Stone sculptures were deliberately vandalised, valuables were sometimes concealed in hoards, suggesting unrest, and the corpses of animals and even humans were left unburied in the streets and in abandoned buildings. During the later half of the 2nd millennium BCE, most of the post-urban Late Harappan settlements were abandoned altogether. Subsequent material culture was typically characterised by temporary occupation, "the campsites of a population which was nomadic and mainly pastoralist" and which used "crude handmade pottery". However, there is greater continuity and overlap between Late Harappan and subsequent cultural phases at sites in Punjab, Haryana, and western Uttar Pradesh, primarily small rural settlements. === Aryan migration === In 1953 Sir Mortimer Wheeler proposed that the invasion of an Indo-European tribe from Central Asia, the "Aryans", caused the decline of the Indus civilisation. As evidence, he cited a group of 37 skeletons found in various parts of Mohenjo-daro, and passages in the Vedas referring to battles and forts. However, scholars soon started to reject Wheeler's theory, since the skeletons belonged to a period after the city's abandonment and none were found near the citadel. Subsequent examinations of the skeletons by Kenneth Kennedy in 1994 showed that the marks on the skulls were caused by erosion, and not by violence. In the Cemetery H culture (the late Harappan phase in the Punjab region), some of the designs painted on the funerary urns have been interpreted through the lens of Vedic literature: for instance, peacocks with hollow bodies and a small human form inside, which has been interpreted as the souls of the dead, and a hound that can be seen as the hound of Yama, the god of death. This may indicate the introduction of new religious beliefs during this period, but the archaeological evidence does not support the hypothesis that the Cemetery H people were the destroyers of the Harappan cities. [[Category:Indian History]] 34c608c440d961c4f6648d3984ea7e3987dd1d75 History of science and technology on the Indian subcontinent 0 577 1367 1179 2024-03-18T09:13:12Z Motzoid India 2 wikitext text/x-wiki {{Short description|Overview of science and technology developed on the Indian subcontinent}} {{About|scientific and technological developments in ancient India|the modern-day Republic of India|Science and technology in India|modern-day Pakistan|Science and technology in Pakistan}} {{HistoryOfSouthAsia}} {{Science and technology in India}} The '''history of science and technology on the Indian subcontinent''' begins with the [[History of India#Prehistoric era (until c. 3300 BCE)|prehistoric human activity]] of the [[Indus Valley Civilisation]] to the early Indian states and empires.<ref>{{Cite web |url=http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |title=Distribution of Acheulian sites in the Siwalik region |access-date=2015-11-16 |archive-url=https://web.archive.org/web/20120104171240/http://www.assemblage.group.shef.ac.uk/issue7/chauhan.html#distribution |archive-date=2012-01-04 |url-status=dead }}</ref> ==Prehistory== {{See also|List of Indian inventions and discoveries}} [[File:Hand-propelled wheel cart from Indus Valley Civilization.GIF|thumb|Hand-propelled wheel cart, Indus Valley Civilization (3300–1300 BCE). Housed at the [[National Museum, New Delhi]].]] By 5500 BCE a number of sites similar to [[Mehrgarh]] (modern-day [[Pakistan]]) had appeared, forming the basis of later chalcolithic cultures.<ref name=Kenoyer230/> The inhabitants of these sites maintained trading relations with [[Central Asia]] and the [[Near East]].<ref name=Kenoyer230>Kenoyer, 230</ref> Irrigation was developed in the Indus Valley Civilization by around 4500 BCE.<ref name=R&U/> The size and prosperity of the Indus civilization grew as a result of this innovation, which eventually led to more planned settlements making use of [[drainage]] and [[sewerage]].<ref name=R&U>Rodda & Ubertini, 279</ref> Sophisticated irrigation and water storage systems were developed by the Indus Valley Civilization, including artificial [[reservoir]]s at [[Girnar]] dated to 3000 BCE, and an early [[canal]] irrigation system from c. 2600 BCE.<ref>Rodda & Ubertini, 161</ref> [[Cotton]] was cultivated in the region by the 5th–4th millennia BCE.<ref>Stein, 47</ref> [[Sugarcane]] was originally from tropical South and Southeast Asia.<ref name=Sharpe/> Different species likely originated in different locations with ''S. barberi'' originating in India, and ''S. edule'' and ''S. officinarum'' coming from [[New Guinea]].<ref name=Sharpe>Sharpe (1998)</ref> The inhabitants of the Indus valley developed a system of [[standardization]], using weights and measures, evident by the excavations made at the Indus valley sites.<ref name=Baber_b>Baber, 23</ref> This [[technical standard]]ization enabled gauging devices to be effectively used in [[angular measurement]] and measurement for construction.<ref name=Baber_b/> [[Calibration]] was also found in measuring devices along with multiple subdivisions in case of some devices.<ref name=Baber_b/> One of the earliest known [[Dock (maritime)|dock]]s is at [[Lothal]] (2400 BCE), located away from the main current to avoid deposition of silt.<ref name="RaoQ"/> Modern oceanographers have observed that the [[Indus Valley Civilisation#Early Harappan|Harappans]] must have possessed knowledge relating to tides in order to build such a dock on the ever-shifting course of the [[Sabarmati]], as well as exemplary [[hydrography]] and maritime engineering.<ref name="RaoQ">Rao, 27–28</ref> Excavations at [[Balakot]] ([[Kot Bala]]) (c. 2500–1900 BCE), modern day Pakistan, have yielded evidence of an early [[Metallurgical furnace|furnace]].<ref name=Dales/> The furnace was most likely used for the manufacturing of [[ceramic]] objects.<ref name=Dales>Dales, 3–22 [10]</ref> [[Oven]]s, dating back to the civilization's mature phase (c. 2500–1900 BCE), were also excavated at Balakot.<ref name=Dales/> The [[Kalibangan]] archeological site further yields evidence of potshaped [[hearth]]s, which at one site have been found both on ground and underground.<ref name=Baber20>Baber, 20</ref> [[Kiln]]s with fire and kiln chambers have also been found at the Kalibangan site.<ref name=Baber20/> [[File:Ashoka pillar at Vaishali, Bihar, India.jpg|thumb|left|View of the Ashokan Pillar at [[Vaishali (ancient city)|Vaishali]]. One of the [[edicts of Ashoka]] (272–231 BCE) reads: "Everywhere King Piyadasi (Ashoka) erected two kinds of hospitals, hospitals for people and hospitals for animals. Where there were no healing herbs for people and animals, he ordered that they be bought and planted."<ref name=finger12>Finger, 12</ref>]] Based on archaeological and textual evidence, [[Joseph E. Schwartzberg]] (2008)—a [[University of Minnesota]] [[professor emeritus]] of geography—traces the origins of [[Indian cartography]] to the Indus Valley Civilization (c. 2500–1900 BCE).<ref name=Schwartzberg1/> The use of large scale constructional plans, cosmological drawings, and cartographic material was known in [[South Asia]] with some regularity since the [[Vedic period]] (2nd – 1st millennium BCE).<ref name=Schwartzberg1>"We now believe that some form of mapping was practiced in what is now India as early as the Mesolithic period, that surveying dates as far back as the Indus Civilization (ca. 2500–1900 BCE), and that the construction of large-scale plans, cosmographic maps, and other cartographic works has occurred continuously at least since the late Vedic age (first millennium BCE)" — Joseph E. Schwartzberg, 1301.</ref> Climatic conditions were responsible for the destruction of most of the evidence, however, a number of excavated surveying instruments and measuring rods have yielded convincing evidence of early cartographic activity.<ref name=Schwartzberg1301-1302>Schwartzberg, 1301–1302</ref> Schwartzberg (2008)—on the subject of surviving maps—further holds that: 'Though not numerous, a number of map-like graffiti appear among the thousands of Stone Age Indian cave paintings; and at least one complex Mesolithic diagram is believed to be a representation of the cosmos.'<ref name=Schwartzberg1301>Schwartzberg, 1301</ref> Archeological evidence of an animal-drawn [[plough]] dates back to 2500 BCE in the Indus Valley Civilization.<ref name=lal>Lal (2001)</ref> The earliest available [[sword]]s of copper discovered from the Harappan sites date back to 2300 BCE.<ref name=allchin1/> Swords have been recovered in archaeological findings throughout the [[Ganges]]–[[Jaunpur, Uttar Pradesh|Jamuna]] [[Doab]] region of India, consisting of [[bronze]] but more commonly copper.<ref name=allchin1>Allchin, 111–112</ref> ==Early kingdoms== [[File:Ganesha ink.jpg|thumb|Ink drawing of Ganesha under an umbrella (early 19th century). [[India ink|Carbon pigment]] [[Ink]], called ''masi'', and popularly known as [[India ink]] was an admixture of several chemical components, has been used in India since at least the 4th century BCE.<ref>Banerji, 673</ref> The practice of writing with ink and a sharp pointed needle was common in early [[South India]].<ref>Sircar, 62</ref> Several [[Jain]] sutras in India were compiled in [[India ink|Carbon pigment]] [[Ink]].<ref>Sircar, 67</ref> ]] [[File:Hindu-arabic1.jpg|thumb|The ''Hindu-Arabic numeral'' system. The inscriptions on the edicts of Ashoka (1st millennium BCE) display this number system being used by the Imperial Mauryas.]] The religious texts of the [[Vedic period]] provide evidence for the use of [[History of large numbers|large numbers]].<ref name=hayashi2005-p360-361/> By the time of the last Veda, the ''[[Yajurveda|{{IAST|Yajurvedasaṃhitā}}]]'' (1200–900 BCE), numbers as high as <math>10^{12}</math> were being included in the texts.<ref name=hayashi2005-p360-361>Hayashi, 360–361</ref> For example, the ''[[mantra]]'' (sacrificial formula) at the end of the ''annahoma'' ("food-oblation rite") performed during the ''[[Ashvamedha|aśvamedha]]'' ("an allegory for a horse sacrifice"), and uttered just before-, during-, and just after sunrise, invokes powers of ten from a hundred to a trillion.<ref name=hayashi2005-p360-361/> The [[Shatapatha Brahmana]] (9th century BCE) contains rules for ritual geometric constructions that are similar to the Sulba Sutras.<ref>Seidenberg, 301–342</ref> [[Baudhayana]] (c. 8th century BCE) composed the ''Baudhayana Sulba Sutra'', which contains examples of simple [[Pythagorean triple]]s,<ref>{{citation |first=Meera |last=Nanda |title=Hindutva's science envy |url=http://www.frontline.in/science-and-technology/hindutvas-science-envy/article9049883.ece |newspaper=Frontline |date=16 September 2016 |access-date=14 October 2016}}</ref> such as: <math>(3, 4, 5)</math>, <math>(5, 12, 13)</math>, <math>(8, 15, 17)</math>, <math> (7, 24, 25)</math>, and <math>(12, 35, 37)</math><ref name=joseph229>Joseph, 229</ref> as well as a statement of the [[Pythagorean theorem]] for the sides of a square: "The rope which is stretched across the diagonal of a square produces an area double the size of the original square."<ref name=joseph229/> It also contains the general statement of the Pythagorean theorem (for the sides of a rectangle): "The rope stretched along the length of the diagonal of a rectangle makes an area which the vertical and horizontal sides make together."<ref name=joseph229/> Baudhayana gives a formula for the [[square root of two]].<ref name=cooke200>Cooke, 200</ref> Mesopotamian influence at this stage is considered likely.<ref name="Boyer 1991 loc=China and India p. 207">{{Harv|Boyer|1991|loc="China and India" p. 207}}</ref> The earliest [[Indian astronomy|Indian astronomical]] text—named ''[[Vedanga Jyotisha|{{IAST|Vedānga Jyotiṣa}}]]'' and attributed to ''Lagadha''—is considered one of the oldest astronomical texts, dating from 1400 to 1200 BCE (with the extant form possibly from 700 to 600 BCE),<ref name=Cosmic>{{cite book|last=Subbarayappa|first=B. V.|editor=Biswas, S. K. |editor2=Mallik, D. C. V. |editor3=Vishveshwara, C. V. |editor3-link=C. V. Vishveshwara |title=Cosmic Perspectives|chapter-url=https://books.google.com/books?id=PFTGKi8fjvoC&pg=FA25|date=14 September 1989|publisher=Cambridge University Press|isbn=978-0-521-34354-1|pages=25–40|chapter=Indian astronomy: An historical perspective}}</ref> it details several astronomical attributes generally applied for timing social and religious events. It also details astronomical calculations, calendrical studies, and establishes rules for empirical observation.<ref name= Subbaarayappa>Subbaarayappa, 25–41</ref> Since the ''{{IAST|Vedānga Jyotiṣa}}'' is a religious text, it has connections with [[hindu astrology]] and details several important aspects of the time and seasons, including lunar months, solar months, and their adjustment by a lunar leap month of ''Adhikamāsa''.<ref name=Tripathi08>Tripathi, 264–267</ref> ''[[Ritu (Indian season)|Ritus]]'' and ''[[Yuga]]s'' are also described.<ref name=Tripathi08/> Tripathi (2008) holds that "Twenty-seven constellations, eclipses, seven planets, and twelve signs of the zodiac were also known at that time."<ref name=Tripathi08/> The [[Egypt]]ian ''Papyrus of Kahun'' (1900 BCE) and literature of the [[Vedic period]] in India offer early records of [[veterinary medicine]].<ref>Thrusfield, 2</ref> Kearns & Nash (2008) state that mention of [[leprosy]] is described in the medical treatise ''[[Sushruta Samhita]]'' (6th century BCE). The [[Sushruta Samhita]] an [[Ayurvedic]] text contains 184 chapters and description of 1120 illnesses, 700 medicinal plants, a detailed study on Anatomy, 64 preparations from mineral sources and 57 preparations based on animal sources.<ref name=Dwivedi&Dwivedi07 /><ref name=k&n08>Kearns & Nash (2008)</ref> However, ''The Oxford Illustrated Companion to Medicine'' holds that the mention of leprosy, as well as ritualistic cures for it, were described in the Hindu religious book ''[[Atharvaveda]]'', written in 1500–1200 BCE.<ref>Lock etc., 420</ref> [[Cataract surgery]] was known to the physician [[Sushruta]] (6th century BCE).<ref name=finger66>Finger, 66</ref> Traditional cataract surgery was performed with a special tool called the ''Jabamukhi Salaka'', a curved needle used to loosen the lens and push the cataract out of the field of vision.<ref name=finger66/> The eye would later be soaked with warm butter and then bandaged.<ref name=finger66/> Though this method was successful, Susruta cautioned that it should only be used when necessary.<ref name=finger66/> The removal of cataract by surgery was also introduced into China from India.<ref>Lade & Svoboda, 85</ref> Sushruta's treatise provides the first written record of a cheek flap rhinoplasty, a technique still used today to reconstruct a nose.{{citation needed|date=November 2023}}<!-- Empty reference <ref name="Wujastyk 2023"/--> The text mentions more than 15 methods to repair it. These include using a flap of skin from the cheek, which is akin to the most modern technique today.<ref>{{Cite web|title=An English Translation of the Sushruta Samhita, Based on Original Sanskrit Text. Edited and Published by Kaviraj Kunja Lal Bhishagratna. With a Full ... Notes, Comperative Views, Index, Glossary An (Book)|url=https://www.worldhistory.org/books/1296562271/|access-date=2021-05-15|website=www.worldhistory.org|date=8 August 2015 |publisher=Andesite Press |isbn=9781296562274 |language=en}}</ref><ref>{{Cite web|title=Sushruta Samhita: The Ancient Treatise on Surgery|url=https://www.livehistoryindia.com/story/snapshort-histories/sushruta-samhita-the-ancient-treatise-on-surgery/|access-date=2021-05-15|website=Live History India|date=27 November 2017 |language=en-US}}</ref>''Otoplasty''' (surgery of the ear) was developed in [[History of India|ancient India]] and is described in the medical compendium, the {{transl|sa|[[Sushruta Samhita]]}} (Sushruta's Compendium, {{circa|500 AD}}).the first description of a surgical procedure to treat stones was described in the [[Sushruta Samhita]] by [[Sushruta]] around 600 BC.<ref name=":0" /> Two types of diabetes were identified as separate conditions for the first time by the Indian physicians [[Sushruta]] and [[Charaka]] in 400–500&nbsp;CE with one type being associated with youth and another type with being overweight.<ref name=History2010/> Effective treatment was not developed until the early part of the 20th century when Canadians [[Frederick Banting]] and [[Charles Best (medical scientist)|Charles Best]] isolated and purified insulin in 1921 and 1922.<ref name=History2010/> This was followed by the development of the long-acting insulin [[NPH insulin|NPH]] in the 1940s.<ref name=History2010/> The condition was named "hritshoola" in ancient India and was described by [[Sushruta]] (6th century BC).<ref name="Dwivedi&Dwivedi07">{{cite journal| vauthors = Dwivedi G, Dwivedi S |year=2007 |url=http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |title=Sushruta – the Clinician – Teacher par Excellence |journal=The Indian Journal of Chest Diseases and Allied Sciences |volume=49 |pages=243–4 |url-status = dead|archive-url=https://web.archive.org/web/20081010045900/http://medind.nic.in/iae/t07/i4/iaet07i4p243.pdf |archive-date=2008-10-10}}</ref> [[Angina Pectoris]] During the 5th century BCE, the scholar [[Pāṇini]] had made several discoveries in the fields of [[phonetics]], [[phonology]], and [[morphology (linguistics)|morphology]].<ref name=Ivic>Encyclopædia Britannica (2008), ''Linguistics''.</ref> [[Pāṇini]]'s morphological analysis remained more advanced than any equivalent Western theory until the mid-20th century.<ref>{{cite book | last1 = Staal | first1 = Frits | title = Universals: studies in Indian logic and linguistics | url = https://archive.org/details/universalsstudie00staa | url-access = limited | publisher = University of Chicago Press | year = 1988 | pages = [https://archive.org/details/universalsstudie00staa/page/n57 47] }}</ref> [[Metal]] [[currency]] was minted in India before the 5th century BCE,<ref name=Dhavalikar>Dhavalikar, 330–338</ref><ref name=sellwood2008>Sellwood (2008)</ref> with coinage (400 BCE–100 CE) being made of [[silver]] and copper, bearing animal and plant symbols on them.<ref name=EBAllan&Stern>Allan & Stern (2008)</ref> [[Zinc]] mines of Zawar, near [[Udaipur]], [[Rajasthan]], were active during 400 BCE.<ref name=Craddock>Craddock (1983)</ref><ref>[[Arun Kumar Biswas]], "The primacy of India in ancient brass and zinc metallurgy", Indian J History of Science, 28(4) (1993) page 309–330; and "Brass and zinc metallurgy in the ancient and medieval world: India's primacy and the technology transfer to the west", Indian J History of Science, 41(2) (2006) 159–174</ref> Diverse specimens of swords have been discovered in [[Fatehgarh]], where there are several varieties of hilt.<ref>F.R. Allchin, 111–112</ref> These swords have been variously dated to periods between 1700 and 1400 BCE, but were probably used more extensively during the opening centuries of the 1st millennium BCE.<ref name=Allchin114>Allchin, 114</ref> Archaeological sites in such as Malhar, Dadupur, Raja Nala Ka Tila and Lahuradewa in present-day [[Uttar Pradesh]] show iron implements from the period between 1800 BCE and 1200 BCE.<ref name=Tewari>Tewari (2003)</ref> Early iron objects found in India can be dated to 1400 BCE by employing the method of radio carbon dating.<ref name=Ceccarelli>Ceccarelli, 218</ref> Some scholars believe that by the early 13th century BCE iron smelting was practiced on a bigger scale in India, suggesting that the date of the technology's inception may be placed earlier.<ref name=Tewari/> In [[Southern India]] (present day [[Mysore]]) iron appeared as early as 11th to 12th centuries BCE.<ref name=UCP/> These developments were too early for any significant close contact with the northwest of the country.<ref name=UCP>Drakonoff, 372</ref> ==Middle Kingdoms (230 BCE – 1206 CE)== [[File:QtubIronPillar.JPG|thumb|The [[iron pillar of Delhi]] (375–413 CE). The first iron pillar was the Iron pillar of Delhi, erected at the times of Chandragupta II Vikramaditya.]] The ''[[Arthashastra]]'' of [[Kautilya]] mentions the construction of dams and bridges.<ref>Dikshitar, pg. 332</ref> The use of [[suspension bridge]]s using plaited bamboo and iron chain was visible by about the 4th century.<ref>Encyclopædia Britannica (2008), ''suspension bridge''.</ref> The ''[[stupa]]'', the precursor of the [[pagoda]] and [[torii]], was constructed by the 3rd century BCE.<ref name=Ency>Encyclopædia Britannica (2008), ''Pagoda''.</ref><ref name=Jaanus>[http://www.aisf.or.jp/~jaanus/ Japanese Architecture and Art Net Users System (2001), ''torii''.]</ref> Rock-cut [[step well]]s in the region date from 200 to 400 CE.<ref name=L&B/> Subsequently, the construction of wells at Dhank (550–625 CE) and stepped ponds at [[Bhinmal]] (850–950 CE) took place.<ref name=L&B>Livingston & Beach, xxiii</ref> During the 1st millennium BCE, the [[Vaisheshika]] school of [[atomism]] was founded. The most important proponent of this school was [[Kanada (philosopher)|Kanada]], an [[Indian philosophy|Indian philosopher]].<ref>Oliver Leaman, ''Key Concepts in Eastern Philosophy.'' Routledge, 1999, page 269.</ref> The school proposed that [[atom]]s are indivisible and eternal, can neither be created nor destroyed,<ref>{{harvnb|Chattopadhyaya|1986|pp=169–70}}</ref> and that each one possesses its own distinct {{IAST |viśeṣa}} (individuality).<ref>{{harvnb|Choudhury|2006|p=202}}</ref> It was further elaborated on by the [[Buddhist atomism|Buddhist school of atomism]], of which the philosophers [[Dharmakirti]] and [[Dignāga]] in the 7th century CE were the most important proponents. They considered atoms to be point-sized, durationless, and made of energy.<ref>(Stcherbatsky 1962 (1930). Vol. 1. P. 19)</ref> By the beginning of the [[Common Era]] glass was being used for ornaments and casing in the region.<ref name=Ghosh/> Contact with the [[Greco-Roman world]] added newer techniques, and local artisans learnt methods of glass molding, decorating and coloring by the early centuries of the Common Era.<ref name=Ghosh>Ghosh, 219</ref> The [[Satavahana]] period further reveals short cylinders of composite glass, including those displaying a lemon yellow matrix covered with green glass.<ref name=Ghosh2>"Ornaments, Gems etc." (Ch. 10) in Ghosh 1990.</ref> [[Wootz]] originated in the region before the beginning of the common era.<ref>Srinivasan & Ranganathan</ref> Wootz was exported and traded throughout Europe, China, the Arab world, and became particularly famous in the Middle East, where it became known as [[Damascus steel]]. Archaeological evidence suggests that manufacturing process for Wootz was also in existence in South India before the Christian era.<ref name=Srinivasan94>Srinivasan (1994)</ref><ref>Srinivasan & Griffiths</ref> Evidence for using bow-instruments for [[carding]] comes from India (2nd century CE).<ref name=Baber57>Baber, 57</ref> The mining of [[Diamond (gemstone)|diamonds]] and its early use as gemstones originated in India.<ref name=Wenk1>Wenk, 535–539</ref> [[Golconda]] served as an important early center for diamond mining and processing.<ref name=Wenk1/> Diamonds were then exported to other parts of the world.<ref name=Wenk1/> Early reference to diamonds comes from Sanskrit texts.<ref name=Encarta11>MSN Encarta (2007), [http://encarta.msn.com/encyclopedia_761557986/Diamond.html ''Diamond'']. [https://web.archive.org/web/20091028121034/http://encarta.msn.com/encyclopedia_761557986/Diamond.html Archived] 2009-10-31.</ref> The ''Arthashastra'' also mentions diamond trade in the region.<ref name=lee1>Lee, 685</ref> The [[Iron pillar of Delhi]] was erected at the times of [[Chandragupta II]] Vikramaditya (375–413), which stood without rusting for around 2 millennium.<ref>Balasubramaniam, R., 2002</ref> The [[Rasaratna Samuchaya]] (800) explains the existence of two types of ores for zinc metal, one of which is ideal for metal extraction while the other is used for medicinal purpose.<ref name=Craddock2>Craddock, 13</ref> In the 2nd century, the [[Buddhist philosophy|Buddhist]] philosopher [[Nagarjuna]] refined the ''Catuskoti'' form of logic. The Catuskoti is also often glossed ''[[Tetralemma]]'' (Greek) which is the name for a largely comparable, but not equatable, 'four corner argument' within the tradition of [[Classical logic]]. The origins of the [[spinning wheel]] are unclear but [[South Asia]] is one of the probable places of its origin.<ref>Britannica Concise Encyclopedia (2007), ''spinning wheel''.</ref><ref>Encyclopeedia Britnnica (2008). ''spinning''.</ref> The device certainly reached Europe from India by the 14th century.<ref>MSN Encarta (2008), [http://encarta.msn.com ''Spinning'']. 2009-10-31.</ref> The cotton gin was invented in [[South Asia]] as a mechanical device known as ''charkhi'', the "wooden-worm-worked roller".<ref name="Baber57">Baber, 57</ref> This mechanical device was, in some parts of the region, driven by water power.<ref name="Baber57"/> The [[Ajanta Caves]] yield evidence of a single roller [[cotton gin]] in use by the 5th century.<ref name=Babergin>Baber, 56</ref> This cotton gin was used until further innovations were made in form of foot powered gins.<ref name=Babergin/> Chinese documents confirm at least two missions to India, initiated in 647, for obtaining technology for sugar-refining.<ref name=Kieschnick11>Kieschnick, 258</ref> Each mission returned with different results on refining sugar.<ref name=Kieschnick11/> [[Pingala]] (300–200 BCE) was a [[musical theory|musical theorist]] who authored a [[Sanskrit]] treatise on [[Prosody (music)|prosody]]. There is evidence that in his work on the enumeration of syllabic combinations, Pingala stumbled upon both the [[Pascal triangle]] and [[Binomial coefficients]], although he did not have knowledge of the [[Binomial theorem]] itself.<ref name=fowler96>Fowler, 11</ref><ref name=singh36>Singh, 623–624</ref> A description of [[binary numbers]] is also found in the works of Pingala.<ref>Sanchez & Canton, 37</ref> The Indians also developed the use of the law of signs in multiplication. Negative numbers and the subtrahend had been used in [[East Asia]] since the 2nd century BCE, and [[South Asian]] mathematicians were aware of negative numbers by the 7th century CE,<ref name=Smith>Smith (1958), page 258</ref> and their role in mathematical problems of debt was understood.<ref name=bourbaki49>Bourbaki (1998), page 49</ref> Although the Indians were not the first to use the subtrahend, they were the first to establish the "law of signs" with regards to the multiplication of positive and negative numbers, which did not appear in East Asian texts until 1299.<ref name=Smith2>Smith (1958), page 257–258</ref> Mostly consistent and correct rules for working with negative numbers were formulated,<ref name=bourbaki46>{{Harvnb|Bourbaki|1998|p=46}}</ref> and the diffusion of these rules led the Arab intermediaries to pass it on to Europe.<ref name=bourbaki49/> A [[decimal|decimal number system]] using hieroglyphics dates back to 3000 BC in [[Egypt]],<ref>Georges Ifrah: ''From One to Zero. A Universal History of Numbers'', Penguin Books, 1988, {{ISBN|0-14-009919-0}}, pp. 200–213 (Egyptian Numerals)</ref> and was later in use in ancient India.<ref name=irfah346>Ifrah, 346</ref> By the 9th century CE, the [[Hindu–Arabic numeral system]] was transmitted from the Middle East and to the rest of the world.<ref name="Wigelsworth">{{cite book|author=Jeffrey Wigelsworth|title=Science And Technology in Medieval European Life|url=https://books.google.com/books?id=VPDqnGGHpHYC&pg=PA18|date=1 January 2006|publisher=Greenwood Publishing Group|isbn=978-0-313-33754-3|page=18}}</ref> The concept of [[zero|0]] as a number, and not merely a symbol for separation is attributed to India.<ref name=bourbaki46_2>Bourbaki, 46</ref> In India, practical calculations were carried out using zero, which was treated like any other number by the 9th century CE, even in case of division.<ref name=bourbaki46/><ref name=ebcal>Britannica Concise Encyclopedia (2007). ''algebra''</ref> [[Brahmagupta]] (598–668) was able to find (integral) solutions of [[Pell's equation]]<ref name=sw101>Stillwell, 72–73</ref> and first described [[gravity]] as an attractive force, and used the term "gurutvākarṣaṇam (गुरुत्वाकर्षणम्)]" in Sanskrit to describe it.<ref name="Oxford">{{cite book|last=Pickover|first=Clifford|url=https://books.google.com/books?id=SQXcpvjcJBUC&pg=PA105|title=Archimedes to Hawking: Laws of Science and the Great Minds Behind Them|date=2008|publisher=Oxford University Press|isbn=978-0-19-979268-9|page=105}}</ref> Conceptual design for a [[perpetual motion machine]] by [[Bhāskara II|Bhaskara II]] dates to 1150. He described a wheel that he claimed would run forever.<ref>Lynn Townsend White, Jr.</ref> The [[Trigonometry|trigonometric]] functions of [[sine]] and [[versine]], from which it was trivial to derive the cosine, were used by the mathematician, [[Aryabhata]], in the late 5th century.<ref>O'Connor, J. J. & Robertson, E.F. (1996)</ref><ref>"Geometry, and its branch trigonometry, was the mathematics Indian astronomers used most frequently. In fact, the Indian astronomers in the third or fourth century, using a pre-Ptolemaic Greek table of chords, produced tables of sines and versines, from which it was trivial to derive cosines. This new system of trigonometry, produced in India, was transmitted to the Arabs in the late eighth century and by them, in an expanded form, to the Latin West and the Byzantine East in the twelfth century" – Pingree (2003).</ref> The [[calculus]] theorem now known as "[[Rolle's theorem]]" was stated by mathematician, [[Bhāskara II]], in the 12th century.<ref>Broadbent, 307–308</ref> [[File:The Defeat of Baz Bahadur of Malwa by the Mughal Troops, 1561, Akbarnama.jpg|thumb|[[Akbarnama]]—written by August 12, 1602—depicts the defeat of [[Baz Bahadur]] of [[Malwa]] by the [[Mughal Empire|Mughal]] troops, 1561. The Mughals extensively improved metal weapons and armor used by the armies of India.]] [[Indigo dye|Indigo]] was used as a dye in [[South Asia]], which was also a major center for its production and processing.<ref name=k&c>Kriger & Connah, 120</ref> The ''Indigofera tinctoria'' variety of Indigo was domesticated in India.<ref name=k&c/> Indigo, used as a dye, made its way to the [[ancient Greece|Greeks]] and the [[Ancient Rome|Romans]] via various trade routes, and was valued as a luxury product.<ref name=k&c/> The [[cashmere wool]] fiber, also known as ''pashm'' or ''pashmina'', was used in the handmade shawls of Kashmir.<ref>Encyclopædia Britannica (2008), ''cashmere''.</ref> The woolen shawls from [[Kashmir]] region find written mention between 3rd century BCE and the 11th century CE.<ref name=ebpasm>Encyclopædia Britannica (2008), ''Kashmir shawl''.</ref> Crystallized sugar was discovered by the time of the [[Gupta Empire]],<ref name=Adas>Shaffer, 311</ref> and the earliest reference to candied sugar comes from India.<ref name=Kieschnick1>Kieschnick (2003)</ref> [[Jute]] was also cultivated in India.<ref name=ebjute>Encyclopædia Britannica (2008), ''jute''.</ref> [[Muslin]] was named after the city where Europeans first encountered it, [[Mosul]], in what is now [[Iraq]], but the fabric actually originated from [[Dhaka]] in what is now [[Bangladesh]].<ref>{{cite book |last=Karim |first=Abdul |year=2012 |chapter=Muslin |chapter-url=http://en.banglapedia.org/index.php?title=Muslin |editor1-last=Islam |editor1-first=Sirajul |editor1-link=Sirajul Islam |editor2-last=Jamal |editor2-first=Ahmed A. |title=Banglapedia: National Encyclopedia of Bangladesh |edition=Second |publisher=[[Asiatic Society of Bangladesh]]}}</ref><ref name=Muslin>Ahmad, 5–26</ref> In the 9th century, an [[Islamic economics in the world|Arab merchant]] named Sulaiman makes note of the material's origin in [[Bengal]] (known as ''Ruhml'' in [[Arabic language|Arabic]]).<ref name=Muslin/> European scholar Francesco Lorenzo Pullè reproduced a number of Indian maps in his magnum opus ''La Cartografia Antica dell India''.<ref name=Sircar2>Sircar 328</ref> Out of these maps, two have been reproduced using a manuscript of ''Lokaprakasa'', originally compiled by the polymath Ksemendra ([[Kashmir]], 11th century CE), as a source.<ref name=Sircar2/> The other manuscript, used as a source by Francesco I, is titled ''Samgraha''.<ref name=Sircar2/> ''[[Samarangana Sutradhara]]'', a [[Sanskrit]] treatise by [[Bhoja]] (11th century), includes a chapter about the construction of mechanical contrivances ([[automata]]), including mechanical bees and birds, fountains shaped like humans and animals, and male and female dolls that refilled oil lamps, danced, played instruments, and re-enacted scenes from Hindu mythology.<ref>{{cite book|last=Varadpande|first=Manohar Laxman|year=1987|title=History of Indian Theatre, Volume 1|page=68|publisher=Abhinav Publications |isbn=9788170172215|url=https://books.google.com/books?id=SyxOHOCVcVkC&pg=PA68}}</ref><ref>{{cite book|last= Wujastyk|first=Dominik|year=2003|title=The Roots of Ayurveda: Selections from Sanskrit Medical Writings|page=222|publisher=Penguin |isbn=9780140448245|url=https://books.google.com/books?id=TaZCwjtmzZYC&q=automata&pg=PA222}}</ref><ref>{{cite book|last=Needham|first=Joseph|year=1965|title=Science and Civilisation in China: Volume 4, Physics and Physical Technology Part 2, Mechanical Engineering|page=164|publisher=Cambridge University Press |isbn=9780521058032|url=https://books.google.com/books?id=SeGyrCfYs2AC&q=bhoja+automata&pg=PA164}}</ref> == Late Medieval (1206–1527) == [[Madhava of Sangamagrama]] (c. 1340 – 1425) and his [[Kerala school of astronomy and mathematics]] developed and founded [[mathematical analysis]].<ref>{{cite web |publisher = School of Mathematics and Statistics University of St Andrews, Scotland |work = Biography of Madhava |author1 = J J O'Connor |author2 = E F Robertson |url = http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |title = Mādhava of Sangamagrāma |access-date = 2007-09-08 |archive-url = https://web.archive.org/web/20060514012903/http://www-gap.dcs.st-and.ac.uk/~history/Biographies/Madhava.html |archive-date = 2006-05-14 |url-status = dead }}</ref> The infinite series for [[pi|π]] was stated by him, and he made use of the series expansion of <math>\arctan x</math> to obtain an infinite series expression, now known as the ''Madhava-Gregory series'', for <math>\pi</math>. Their rational approximation of the ''error'' for the finite sum of their series are of particular interest. They manipulated the error term to derive a faster converging series for <math>\pi</math>. They used the improved series to derive a rational expression,<ref name="roy" /> <math>104348/33215</math> for <math>\pi</math> correct up to nine decimal places, ''i.e.'' <math>3.141592653 </math> (of 3.1415926535897...).<ref name="roy">Roy, 291–306</ref> The development of the [[Series (mathematics)|series]] expansions for [[trigonometric function]]s (sine, cosine, and [[arc tangent]]) was carried out by mathematicians of the Kerala School in the 15th century CE.<ref name="sll" /> Their work, completed two centuries before the invention of [[calculus]] in Europe, provided what is now considered the first example of a [[power series]] (apart from geometric series).<ref name="sll">Stillwell, 173</ref> Mathmatation [[Narayana Pandita (mathematician)|Narayana Pandit]] wrote two works, an arithmetical treatise called ''Ganita Kaumudi'' and an [[Algebra|algebraic]] treatise called ''Bijaganita Vatamsa''. Narayana is also made contributions to algebra and [[Magic square|magic squares]].Narayana's other major works contain a variety of investigations into the second order [[indeterminate equation]] ''nq''<sup>2</sup> + 1 = ''p''<sup>2</sup> ([[Pell's equation]]), solutions of indeterminate [[Degree of a polynomial|higher-order equations]] Narayana has also made contributions to the topic of [[Cyclic quadrilateral|cyclic quadrilaterals]]. The [[Navya Nyaya]] school began around [[East India|eastern India]] and [[Bengal]], and developed theories resembling modern logic, such as [[Gottlob Frege]]'s "distinction between sense and reference of proper names" and his "definition of number," as well as the Navya-Nyaya theory of "restrictive conditions for universals" anticipating some of the developments in modern [[set theory]].<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873|quote=This paper consists of three parts. The first part deals with Frege's distinction between sense and reference of proper names and a similar distinction in Navya-Nyaya logic. In the second part we have compared Frege's definition of number to the Navya-Nyaya definition of number. In the third part we have shown how the study of the so-called 'restrictive conditions for universals' in Navya-Nyaya logic anticipated some of the developments of modern set theory.}}</ref> Udayana in particular developed theories on "restrictive conditions for universals" and "[[Infinity|infinite]] regress" that anticipated aspects of modern set theory. According to Kisor Kumar Chakrabarti:<ref>{{citation|title=Some Comparisons Between Frege's Logic and Navya-Nyaya Logic|author=Kisor Kumar Chakrabarti|journal=Philosophy and Phenomenological Research|volume=36|issue=4|date=June 1976|pages=554–563|publisher=International Phenomenological Society|doi=10.2307/2106873 |jstor=2106873}}</ref> The [[Navya-Nyāya]] or Neo-Logical darśana (school) of Indian philosophy was founded in the 13th century CE by the philosopher [[Gangesha Upadhyaya]] of [[Mithila (India)|Mithila]]. It was a development of the classical Nyāya darśana. Other influences on Navya-Nyāya were the work of earlier philosophers [[Vācaspati Miśra]] (900–980 CE) and [[Udayana]] (late 10th century).Navya-Nyāya developed a sophisticated language and conceptual scheme that allowed it to raise, analyse, and solve problems in logic and epistemology. It systematised all the Nyāya concepts into four main categories: sense or perception (pratyakşa), inference (anumāna), comparison or similarity ([[upamāna]]), and testimony (sound or word; śabda). [[Sher Shah Suri|Shēr Shāh]] of northern India issued silver currency bearing Islamic motifs, later imitated by the [[Mughal Empire]].<ref name="EBAllan&Stern" /> The Chinese merchant [[Ma Huan]] (1413–51) noted that gold coins, known as ''fanam'', were issued in [[Cochin]] and weighed a total of one ''fen'' and one ''li'' according to the Chinese standards.<ref name="Chaudhuri223">Chaudhuri, 223</ref> They were of fine quality and could be exchanged in China for 15 silver coins of four-''li'' weight each.<ref name="Chaudhuri223" /> [[File:Jahangir holding a globe, 1614-1618.jpg|alt=|left|thumb|[[Jahangir]] holding a seamless [[celestial globe]]. This was one of the first examples of Seamless hollow Metallurgy. ]] In 1500, [[Nilakantha Somayaji]] of the [[Kerala school of astronomy and mathematics]], in his [[Tantrasangraha]], revised Aryabhata's elliptical model for the planets Mercury and Venus. His equation of the centre for these planets remained the most accurate until the time of [[Johannes Kepler]] in the 17th century.<ref>Joseph, George G. (2000), ''The Crest of the Peacock: Non-European Roots of Mathematics'', Penguin Books, {{ISBN|0-691-00659-8}}. </ref> Gunpowder and gunpowder weapons were transmitted to India through the [[Mongol invasions of India]].<ref name="Kn">{{cite book|author=Iqtidar Alam Khan|title=Gunpowder And Firearms: Warfare In Medieval India|year=2004|publisher=Oxford University Press|isbn=978-0-19-566526-0}}</ref>{{Request quotation|date=August 2021}}<ref name="kn2" /> The Mongols were defeated by [[Alauddin Khalji]] of the [[Delhi Sultanate]], and some of the Mongol soldiers remained in northern India after their conversion to Islam.<ref name="kn2">{{cite book|author=Iqtidar Alam Khan|title=Historical Dictionary of Medieval India|url=https://books.google.com/books?id=pzZFUcDpDzsC&pg=PA103|date=25 April 2008|publisher=Scarecrow Press|isbn=978-0-8108-5503-8|page=103}}</ref> It was written in the ''Tarikh-i Firishta'' (1606–1607) that the envoy of the Mongol ruler [[Hulagu Khan]] was presented with a [[pyrotechnics]] display upon his arrival in [[Delhi]] in 1258 CE.<ref name="khan 9 10">Khan, 9–10</ref> As a part of an embassy to India by [[Timur]]id leader Shah Rukh (1405–1447), 'Abd al-Razzaq mentioned naphtha-throwers mounted on elephants and a variety of pyrotechnics put on display.<ref name="GF2">Partington, 217</ref> Firearms known as ''top-o-tufak'' also existed in the [[Vijayanagara Empire]] by as early as 1366 CE.<ref name="khan 9 10" /> From then on the employment of [[gunpowder warfare]] in the region was prevalent, with events such as the siege of [[Belgaum]] in 1473 CE by the [[Sultan]] Muhammad Shah Bahmani.<ref name="khan 10">Khan, 10</ref> == Early Modern period (1527–1857 CE) == [[File:Jantar Mantar Delhi 27-05-2005.jpg|alt=|left|thumb|[[Jantar Mantar, New Delhi|Jantar Mantar, Delhi]]—consisting of 13 architectural astronomy instruments, built by [[Jai Singh II]] of Jaipur, from 1724 onwards.]]By the 16th century, [[South Asians]] were manufacturing a diverse variety of firearms; large guns in particular, became visible in [[Tanjore]], [[Dacca]], [[Adil Shahi|Bijapur]] and [[Murshidabad]].<ref name="GF3">Partington, 225</ref> Guns made of bronze were recovered from [[Kozhikode|Calicut]] (1504) and [[Diu, India|Diu]] (1533).<ref name="partingtonquote">Partington, 226</ref> [[Gujarāt]] supplied Europe saltpeter for use in gunpowder warfare during the 17th century.<ref name="IndiaBritannica">Encyclopædia Britannica (2008), ''India.''</ref> [[Bengal]] and [[Malwa|Mālwa]] participated in saltpeter production.<ref name="IndiaBritannica" /> The Dutch, French, Portuguese, and English used [[Chhapra]] as a center of saltpeter refining.<ref>Encyclopædia Britannica (2008), ''Chāpra.''</ref> In ''A History of Greek Fire and Gunpowder'', [[James Riddick Partington]] describes the gunpowder warfare of 16th and 17th century [[Mughal Empire|Mughal]] India, and writes that "Indian war rockets were good weapons before such rockets were used in Europe. They had bamboo rods, a rocket-body lashed to the rod, and iron points. They were directed at the target and fired by lighting the fuse, but the trajectory was rather erratic... The use of mines and counter-mines with explosive charges of gunpowder is mentioned for the times of Akbar and Jahāngir."<ref name="partingtonquote" /> The construction of water works and aspects of water technology in [[South Asia]] is described in [[Arabic]] and [[Persian language|Persian]] works.<ref name=Siddiqui/> During medieval times, the diffusion of [[South Asian]] and [[Iran|Persian]] irrigation technologies gave rise to an advanced irrigation system which bought about growth and also helped in the growth of material culture.<ref name=Siddiqui>Siddiqui, 52–77</ref> The founder of the [[cashmere wool]] industry is believed traditionally held to be the 15th-century ruler of Kashmir, Zayn-ul-Abidin, who introduced weavers from [[Central Asia]].<ref name=ebpasm/> The scholar Sadiq Isfahani of [[Jaunpur, Uttar Pradesh|Jaunpur]] compiled an [[atlas]] of the parts of the world which he held to be 'suitable for human life'.<ref name=Schwartzberg1302>Schwartzberg, 1302</ref> The 32 sheet atlas—with maps oriented towards the south as was the case with Islamic works of the era—is part of a larger scholarly work compiled by Isfahani during 1647 CE.<ref name=Schwartzberg1302/> According to Joseph E. Schwartzberg (2008): 'The largest known Indian map, depicting the former [[Rajput]] capital at [[Kingdom of Amber|Amber]] in remarkable house-by-house detail, measures 661 × 645&nbsp;cm.<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> (260 × 254 in., or approximately 22 × 21&nbsp;ft).'<ref name="Schwartzberg13032">Schwartzberg, 1303</ref> The seamless [[celestial globe]] was invented in Kashmir by Ali Kashmiri ibn Luqman in 998 AH (1589–90 CE), and twenty other such [[globe]]s were later produced in [[Lahore]] and Kashmir during the [[Mughal Empire]].<ref name="Emilie">Savage-Smith (1985)</ref> These Indian metallurgists pioneered the method of [[lost-wax casting]] in order to produce these globes.<ref name="Emilie" /><ref name="voss">{{cite book |last=Roy |first=Tirthankar |title=The Ashgate Companion to the History of Textile Workers, 1650–2000 |publisher=[[Ashgate Publishing]] |year=2010 |isbn=978-0-7546-6428-4 |editor1=Lex Heerma van Voss |page=255 |chapter=The Long Globalization and Textile Producers in India |author-link=Tirthankar Roy |editor2=Els Hiemstra-Kuperus |editor3=Elise van Nederveen Meerkerk |chapter-url={{google books |plainurl=y |id=f95ljbhfjxIC|page=255}}}}</ref>[[File:NL-HaNA 1.11.01.01 1276 1R Brief van J.G. van Angelbeek, gouverneur van Ceylon, uit Cochin, aan de heer Decker, berichtend over de strijd tussen Tipoe en de vorst van Travancone. 1790 januari 14 (cropped).jpg|left|thumb|[[Mysorean rockets]]]] [[Hyder Ali]], prince of Mysore, developed war rockets with an important change: the use of metal cylinders to contain the combustion powder. Although the hammered soft iron he used was crude, the bursting strength of the container of black powder was much higher than the earlier paper construction. Thus a greater internal pressure was possible, with a resultant greater thrust of the propulsive jet. The rocket body was lashed with leather thongs to a long bamboo stick. Range was perhaps up to three-quarters of a mile (more than a kilometre). Although individually these rockets were not accurate, dispersion error became less important when large numbers were fired rapidly in mass attacks. They were particularly effective against cavalry and were hurled into the air, after lighting, or skimmed along the hard dry ground. Hyder Ali's son, [[Tipu Sultan]], continued to develop and expand the use of rocket weapons, reportedly increasing the number of rocket troops from 1,200 to a corps of 5,000. In battles at [[Seringapatam]] in 1792 and 1799 these rockets were used with considerable effect against the British. By the end of the 18th century the postal system in the region had reached high levels of efficiency.<ref name="Peabody1">Peabody, 71</ref> According to Thomas Broughton, the [[Maharaja]] of [[Jodhpur]] sent daily offerings of fresh flowers from his capital to Nathadvara (320&nbsp;km) and they arrived in time for the first religious [[Darśana|Darshan]] at sunrise.<ref name="Peabody1" /> Later this system underwent modernization with the establishment of the [[British Raj]].<ref name="Lowe" /> == Colonial era (1858–1947 CE) == <br /><div style="text-align: center;"><gallery widths="140" heights="140"> File:J.C.Bose.JPG|[[Jagadish Chandra Bose]] laid the foundations of experimental science in the [[Indian subcontinent]].<ref>Chatterjee, Santimay and Chatterjee, Enakshi, ''Satyendranath Bose'', 2002 reprint, p. 5, National Book Trust, {{ISBN|81-237-0492-5}}</ref> He is considered one of the fathers of radio science.<ref>{{cite conference|title=Sir J.C. Bose and radio science|last1=Sen|first1=A. K.|date=1997|publisher=IEEE|book-title=Microwave Symposium Digest|pages=557–560|location=Denver, CO|conference=IEEE MTT-S International Microwave Symposium|isbn=0-7803-3814-6|doi=10.1109/MWSYM.1997.602854}}</ref> File:IndianRailways1871b.jpg|Extent of the railway network in India in 1871; construction had begun in 1856. File:India railways1909a.jpg|The Indian railways network in 1909. File:SatyenBose1925.jpg|Physicist [[Satyendra Nath Bose]] is known for his work on the [[Bose–Einstein statistics]] during the 1920s. File:Sir CV Raman.JPG|[[C. V. Raman]], known for his research in the field of light scattering, also known as [[Raman scattering]]. </gallery> </div> The Post Office Act XVII of 1837 enabled the [[Governor-General of India]] to convey messages by post within the territories of the [[East India Company]].<ref name="Lowe" /> Mail was available to some officials without charge, which became a controversial privilege as the years passed.<ref name="Lowe" /> The Indian Post Office service was established on October 1, 1837.<ref name="Lowe">Lowe, 134</ref> The British also constructed a vast [[railway]] network in the region for both strategic and commercial reasons.<ref>Seaman, 348</ref> The British education system, aimed at producing able civil and administrative services candidates, exposed a number of Indians to foreign institutions.<ref name=Rajendran>Raja (2006)</ref> [[Sir Jagadis Chandra Bose|Jagadis Chandra Bose]] (1858–1937), [[Prafulla Chandra Ray]] (1861–1944), [[Satyendra Nath Bose]] (1894–1974), [[Meghnad Saha]] (1893–1956), [[P. C. Mahalanobis]] (1893–1972), [[C. V. Raman]] (1888–1970), [[Subrahmanyan Chandrasekhar]] (1910–1995), [[Homi J. Bhabha|Homi Bhabha]] (1909–1966), [[Srinivasa Ramanujan]] (1887–1920), [[Vikram Sarabhai]] (1919–1971), [[Har Gobind Khorana]] (1922–2011), [[Harish Chandra]] (1923–1983), [[Abdus Salam]] (1926–1996) and [[E. C. George Sudarshan]] (1933-2018) were among the notable scholars of this period.<ref name=Rajendran/> Extensive interaction between colonial and native sciences was seen during most of the colonial era.<ref name=Arnold211>Arnold, 211</ref> Western science came to be associated with the requirements of nation building rather than being viewed entirely as a colonial entity,<ref name=Arnold212/> especially as it continued to fuel necessities from agriculture to commerce.<ref name=Arnold211/> Scientists from India also appeared throughout Europe.<ref name=Arnold212>Arnold, 212</ref> By the time of India's independence colonial science had assumed importance within the westernized intelligentsia and establishment. French astronomer, Pierre Janssen observed the Solar eclipse of 18 August 1868 and discovered helium, from Guntur in Madras State, British India.<ref name=Arnold212/> == Post-Independence (1947 CE – present) == {{Main|Science and technology in India|Science and technology in Pakistan|Science and technology in Bangladesh}} ==See also== {{col div|colwidth=30em}} * [[List of Indian engineering colleges before Independence]] * [[List of Indian inventions and discoveries]] * [[Timeline of historic inventions]] * [[Timeline of Indian innovation]] * [[Science and technology in India]] ** [[Engineering education in India]] ** [[Information technology in India]] ** [[Science and technology studies in India]] ** [[Nalanda University]] {{colend}} ==Notes== {{reflist|3|refs= <ref name=":0">{{Cite book|title = An English Translation of the Sushruta Samhita, based on Original Sanskrit Text|last = Bhishagratna|first = Kunjalal|year = 1907|location = Calcutta|pages = 1|url = https://archive.org/stream/englishtranslati01susruoft#page/n103/mode/2up|ref = bhishagratna}}</ref> <ref name=History2010>{{cite book |veditors=Poretsky L |title=Principles of diabetes mellitus |year=2009 |publisher=Springer |location=New York|isbn=978-0-387-09840-1|page=3|url=https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |edition=2nd |url-status=live |archive-url=https://web.archive.org/web/20160404170919/https://books.google.com/books?id=i0qojvF1SpUC&pg=PA3 |archive-date=2016-04-04}}</ref> }} ==References== * Allan, J. & Stern, S. M. (2008), ''coin'', Encyclopædia Britannica. * Allchin, F.R. (1979), ''South Asian Archaeology 1975: Papers from the Third International Conference of the Association of South Asian Archaeologists in Western Europe, Held in Paris'' edited by J.E.van Lohuizen-de Leeuw, Brill Academic Publishers, {{ISBN|90-04-05996-2}}. * Ahmad, S. (2005), "Rise and Decline of the Economy of Bengal", ''Asian Affairs'', '''27''' (3): 5–26. * Arnold, David (2004), ''[[The New Cambridge History of India]]: Science, Technology and Medicine in Colonial India'', Cambridge University Press, {{ISBN|0-521-56319-4}}. * Baber, Zaheer (1996), ''The Science of Empire: Scientific Knowledge, Civilization, and Colonial Rule in India'', State University of New York Press, {{ISBN|0-7914-2919-9}}. * Balasubramaniam, R. (2002), ''Delhi Iron Pillar: New Insights'', Indian Institute of Advanced Studies, {{ISBN|81-7305-223-9}}. * BBC (2006), [http://news.bbc.co.uk/2/hi/science/nature/4882968.stm "Stone age man used dentist drill"]. * Bourbaki, Nicolas (1998), ''Elements of the History of Mathematics'', Springer, {{ISBN|3-540-64767-8}}. * {{citation |first=C.B. |last=Boyer |author-link=Carl Benjamin Boyer |title=A History of Mathematics |edition=2nd |place=New York |publisher=Wiley |year=1991 |orig-year=1989 |isbn=978-0-471-54397-8 |url=https://archive.org/details/historyofmathema00boye}} * Broadbent, T. A. A. (1968), "Reviewed work(s): The History of Ancient Indian Mathematics by C. N. Srinivasiengar", ''The Mathematical Gazette'', '''52''' (381): 307–308. * {{Citation |last1=Bourbaki |first1=Nicolas |author-link=Nicolas Bourbaki |year=1998 |title=Elements of the History of Mathematics |publisher=Berlin, Heidelberg, and New York: [[Springer-Verlag]], 301 pages |isbn=978-3-540-64767-6 |url-access=registration |url=https://archive.org/details/elementsofhistor0000bour}}. * Ceccarelli, Marco (2000), ''International Symposium on History of Machines and Mechanisms: Proceedings HMM Symposium'', Springer, {{ISBN|0-7923-6372-8}}. * {{Cite book |last=Chattopadhyaya |first=Debiprasad |title=History of science and technology in ancient India: the beginnings |year=1986 |publisher=Firma KLM Pvt. Ltd |isbn=81-7102-053-4 |oclc=45345319}} * {{Cite book|last=Choudhury|first=Sarojakanta.|url=http://worldcat.org/oclc/224913142|title=Educational philosophy of Dr. Sarvepalli Radhakrishnan|date=2006|publisher=Deep & Deep Publications|isbn=81-7629-766-6|oclc=224913142}} * Chaudhuri, K. N. (1985), ''Trade and Civilisation in the Indian Ocean'', Cambridge University Press, {{ISBN|0-521-28542-9}}. * Craddock, P.T. etc. (1983), ''Zinc production in medieval India'', World Archaeology, '''15''' (2), Industrial Archaeology. * Cooke, Roger (2005), ''The History of Mathematics: A Brief Course'', Wiley-Interscience, {{ISBN|0-471-44459-6}}. * Coppa, A. etc. (2006), "Early neolithic tradition of dentistry", ''Nature'', '''440''': 755–756. * Dales, George (1974), "Excavations at Balakot, Pakistan, 1973", ''Journal of Field Archaeology'', '''1''' (1–2): 3–22 [10]. * Dhavalikar, M. K. (1975), "The beginning of coinage in India", ''World Archaeology'', '''6''' (3): 330–338, Taylor & Francis. * Dikshitar, V. R. R. (1993), ''The Mauryan Polity'', Motilal Banarsidass, {{ISBN|81-208-1023-6}}. * Drakonoff, I. M. (1991), ''Early Antiquity'', University of Chicago Press, {{ISBN|0-226-14465-8}}. * Fowler, David (1996), "Binomial Coefficient Function", ''The American Mathematical Monthly'', '''103''' (1): 1–17. * Finger, Stanley (2001), ''Origins of Neuroscience: A History of Explorations Into Brain Function'', Oxford University Press, {{ISBN|0-19-514694-8}}. * Ghosh, Amalananda (1990), ''An Encyclopaedia of Indian Archaeology'', Brill Academic Publishers, {{ISBN|90-04-09262-5}}. * Hayashi, Takao (2005), "Indian Mathematics", ''The Blackwell Companion to Hinduism'' edited by Gavin Flood, pp.&nbsp;360–375, Basil Blackwell, {{ISBN|978-1-4051-3251-0}}. * Hopkins, Donald R. (2002), ''The Greatest Killer: Smallpox in history'', University of Chicago Press, {{ISBN|0-226-35168-8}}. * Ifrah, Georges (2000), ''A Universal History of Numbers: From Prehistory to Computers'', Wiley, {{ISBN|0-471-39340-1}}. * Joseph, G. G. (2000), ''The Crest of the Peacock: The Non-European Roots of Mathematics'', Princeton University Press, {{ISBN|0-691-00659-8}}. * Kearns, Susannah C.J. & Nash, June E. (2008), ''leprosy'', Encyclopædia Britannica. * Kenoyer, J.M. (2006), "Neolithic Period", ''Encyclopedia of India (vol. 3)'' edited by Stanley Wolpert, Thomson Gale, {{ISBN|0-684-31352-9}}. * Khan, Iqtidar Alam (1996), ''Coming of Gunpowder to the Islamic World and North India: Spotlight on the Role of the Mongols'', Journal of Asian History '''30''': 41–5 . * Kieschnick, John (2003), ''The Impact of Buddhism on Chinese Material Culture'', Princeton University Press, {{ISBN|0-691-09676-7}}. * Kriger, Colleen E. & Connah, Graham (2006), ''Cloth in West African History'', Rowman Altamira, {{ISBN|0-7591-0422-0}}. * Lade, Arnie & Svoboda, Robert (2000), ''Chinese Medicine and Ayurveda'', Motilal Banarsidass, {{ISBN|81-208-1472-X}}. * Lal, R. (2001), "Thematic evolution of ISTRO: transition in scientific issues and research focus from 1955 to 2000", ''Soil and Tillage Research'', '''61''' (1–2): 3–12 [3]. * Lee, Sunggyu (2006), ''Encyclopedia of Chemical Processing'', CRC Press, {{ISBN|0-8247-5563-4}}. * Livingston, Morna & Beach, Milo (2002), ''Steps to Water: The Ancient Stepwells of India'', Princeton Architectural Press, {{ISBN|1-56898-324-7}}. * Lock, Stephen etc. (2001), ''The Oxford Illustrated Companion to Medicine'', Oxford University Press, {{ISBN|0-19-262950-6}}. * Lowe, Robson (1951), ''The Encyclopedia of British Empire Postage Stamps, 1661–1951 (vol. 3)''. * MSNBC (2008), [http://www.nbcnews.com/id/12168308 "Dig uncovers ancient roots of dentistry"]. * Nair, C.G.R. (2004), [http://www.kerala.gov.in/keralcallsep04/p22-24.pdf "Science and technology in free India"] {{Webarchive|url=https://web.archive.org/web/20060821195309/http://www.kerala.gov.in/keralcallsep04/p22-24.pdf |date=2006-08-21 }}, ''Government of Kerala—Kerala Call'', Retrieved on 2006-07-09. * O'Connor, J. J. & Robertson, E.F. (1996), [https://web.archive.org/web/20130120084848/http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Trigonometric_functions.html "Trigonometric functions"], ''[[MacTutor History of Mathematics Archive]]''. * O'Connor, J. J. & Robertson, E. F. (2000), [http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Paramesvara.html "Paramesvara"], ''[[MacTutor History of Mathematics archive]]''. * Partington, James Riddick & Hall, Bert S. (1999), ''A History of Greek Fire and Gunpowder'', Johns Hopkins University Press, {{ISBN|0-8018-5954-9}}. * Peabody, Norman (2003), ''Hindu Kingship and Polity in Precolonial India'', Cambridge University Press, {{ISBN|0-521-46548-6}}. * Peele, Stanton & Marcus Grant (1999), ''Alcohol and Pleasure: A Health Perspective'', Psychology Press, {{ISBN|1-58391-015-8}}. * Piercey, W. Douglas & Scarborough, Harold (2008), ''hospital'', Encyclopædia Britannica. * Pingree, David (2003), "The logic of non-Western science: mathematical discoveries in medieval India", ''Daedalus'', '''132''' (4): 45–54. * Raja, Rajendran (2006), "Scientists of Indian origin and their contributions", ''Encyclopedia of India (Vol 4.)'' edited by Stanley Wolpert, {{ISBN|0-684-31512-2}}. * Rao, S. R. (1985), ''Lothal'', Archaeological Survey of India. * Rodda & Ubertini (2004), ''The Basis of Civilization—Water Science?'', International Association of Hydrological Science, {{ISBN|1-901502-57-0}}. * Roy, Ranjan (1990), "Discovery of the Series Formula for <math> \pi </math> by Leibniz, Gregory, and Nilakantha", ''Mathematics Magazine'', Mathematical Association of America, '''63''' (5): 291–306. * Sanchez & Canton (2006), ''Microcontroller Programming: The Microchip PIC'', CRC Press, {{ISBN|0-8493-7189-9}}. * [[Savage-Smith, Emilie]] (1985), ''Islamicate Celestial Globes: Their History, Construction, and Use'', Smithsonian Institution Press, Washington, D.C. * Schwartzberg, Joseph E. (2008), "Maps and Mapmaking in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;1301–1303, Springer, {{ISBN|978-1-4020-4559-2}}. * Seaman, Lewis Charles Bernard (1973), ''Victorian England: Aspects of English and Imperial History 1837–1901'', Routledge, {{ISBN|0-415-04576-2}}. * Seidenberg, A. (1978), ''The origin of mathematics'', Archive for the history of Exact Sciences, '''18''': 301–342. * Sellwood, D. G. J. (2008), ''coin'', Encyclopædia Britannica. * Shaffer, Lynda N., "Southernization", ''Agricultural and Pastoral Societies in Ancient and Classical History'' edited by Michael Adas, pp.&nbsp;308–324, Temple University Press, {{ISBN|1-56639-832-0}}. * Sharpe, Peter (1998), ''[https://web.archive.org/web/20080518084734/http://www.siu.edu/~ebl/leaflets/sugar.htm Sugar Cane: Past and Present]'', Southern Illinois University. * Siddiqui, I. H. (1986), "Water Works and Irrigation System in India during Pre-Mughal Times", ''Journal of the Economic and Social History of the Orient'', '''29''' (1): 52–77. * Singh, A. N. (1936), "On the Use of Series in Hindu Mathematics", ''Osiris'', '''1''': 606–628. * Sircar, D.C.C. (1990), ''Studies in the Geography of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|81-208-0690-5}}. * Smith, David E. (1958). ''History of Mathematics''. Courier Dover Publications. {{ISBN|0-486-20430-8}}. * Srinivasan, S. & Griffiths, D., "South Indian wootz: evidence for high-carbon steel from crucibles from a newly identified site and preliminary comparisons with related finds", ''Material Issues in Art and Archaeology-V'', Materials Research Society Symposium Proceedings Series Vol. 462. * [https://web.archive.org/web/20181119033451/http://materials.iisc.ernet.in/~wootz/heritage/WOOTZ.htm Srinivasan, S. & Ranganathan, S., ''Wootz Steel: An Advanced Material of the Ancient World'', Bangalore: Indian Institute of Science.] * Srinivasan, S. (1994), "Wootz crucible steel: a newly discovered production site in South India", Institute of Archaeology, University College London, '''5''': 49–61. * Stein, Burton (1998), ''A History of India'', Blackwell Publishing, {{ISBN|0-631-20546-2}}. * Stillwell, John (2004), ''Mathematics and its History (2 edition)'', Springer, {{ISBN|0-387-95336-1}}. * Subbaarayappa, B.V. (1989), "Indian astronomy: an historical perspective", ''Cosmic Perspectives'' edited by Biswas etc., pp.&nbsp;25–41, Cambridge University Press, {{ISBN|0-521-34354-2}}. * Teresi, Dick etc. (2002), ''Lost Discoveries: The Ancient Roots of Modern Science—from the Babylonians to the Maya'', Simon & Schuster, {{ISBN|0-684-83718-8}}. * Tewari, Rakesh (2003), "The origins of Iron Working in India: New evidence from the central Ganga plain and the eastern Vindhyas", ''Antiquity'', '''77''' (297): 536–544. * Thrusfield, Michael (2007), ''Veterinary Epidemiology'', Blackwell Publishing, {{ISBN|1-4051-5627-9}}. * Tripathi, V.N. (2008), "Astrology in India", ''Encyclopaedia of the History of Science, Technology, and Medicine in Non-Western Cultures (2nd edition)'' edited by [[Helaine Selin]], pp.&nbsp;264–267, Springer, {{ISBN|978-1-4020-4559-2}}. * Wenk, Hans-Rudolf etc. (2003), ''Minerals: Their Constitution and Origin'', Cambridge University Press, {{ISBN|0-521-52958-1}}. * White, Lynn Townsend, Jr. (1960), "Tibet, India, and Malaya as Sources of Western Medieval Technology", ''The American Historical Review'' '''65''' (3): 522–526. * Whish, Charles (1835), ''Transactions of the Royal Asiatic Society of Great Britain and Ireland''. ==Further reading== *Alvares, Claude A. (1991) ''Decolonizing history: Technology and culture in India, China and the West 1492 to the Present Day'', New York, USA: Apex Press. [http://www.indianscience.org/essays/29-%20E--F-Decolonising%20History.pdf (review)] * Dharampal (1971) ''Indian Science and Technology in the Eighteenth Century: Some Contemporary European Accounts'' (with a foreword by Dr. D.S..Kothari and Introduction by Dr. William A.Blanpeid), Impex India, Delhi, 1971; reprinted by Academy of Gandhian Studies, Hyderabad 1983. * Anant Priolkar (1958) ''[https://archive.org/details/PrintingPressInIndia The printing press in India, its beginnings and early development; being a quarter-centenary commemoration study of the advent of printing in India] (in 1556).'' xix, 364 S., Bombay: Marathi Samshodhana Mandala, {{doi|10.1017/S0041977X00151158}} * [[Debiprasad Chattopadhyaya]] (1977) ''History of Science and Technology in Ancient India: The Beginnings'' with a foreword by Joseph Needham. * [[Project of History of Indian Science, Philosophy and culture]], Volume 4. Fundamental Indian Ideas in Physics, Chemistry, Life Sciences and Medicine * Project of History of Indian Science, Philosophy and Culture, Monograph series, Volume 3. Mathematics, Astronomy and Biology in Indian Tradition edited by D. P. Chattopadhyaya and Ravinder Kumar * [[T. A. Sarasvati Amma]] (2007)[1979] ''Geometry of Ancient and Medieval India'', Motilal Banarsidass Publishers, {{ISBN|978-81-208-1344-1}} * Shinde, V., Deshpande, S. S., Sarkar, A. (2016) ''Chalcolithic South Asia: Aspects of crafts and technologies'', Indus-Infinity Foundation *In Hāṇḍā, O. (2015) ''Reflections on the history of Indian science and technology'', New Delhi: Pentagon Press in association with Indus-Infinity Foundation. ==External links== {{Wikiquote}} *[https://web.archive.org/web/20181018060358/http://www.nscdelhi.org/exhibition-gallery.php?gallery=184 Our Science and Technology Heritage] gallery for the [[National Science Centre, Delhi|National Science Centre]] in Delhi * [http://www.iish.org/index.php?option=com_content&view=article&id=71:a-brief-introduction-to-technological-brilliance-of-ancient-india&catid=37:heritage-india-news&Itemid=56 A brief introduction to technological brilliance of Ancient India] (Indian Institute of Scientific Heritage) * [http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf Science and Technology in Ancient India] {{Webarchive|url=https://web.archive.org/web/20150501145738/http://sanskritdocuments.org/articles/ScienceTechSanskritAncientIndiaMGPrasad.pdf |date=2015-05-01 }} * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy. * [http://countrystudies.us/india/101.htm ''India: Science and technology'', U.S. Library of Congress.] * [[Indian National Science Academy]] (2001), ''[http://webarchive.loc.gov/all/20051007052834/http://www.insaindia.org/INSA-book.pdf Pursuit and promotion of science: The Indian Experience]'', Indian National Science Academy, * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.1, January 2010, National Council of Science Museums, Kolkata, India, by S.M Khened, [https://web.archive.org/web/20110721162652/http://ncsm.gov.in/science_pdf/Shivaprasad%20Khened.pdf]. * Presenting Indian S&T Heritage in Science Museums, Propagation : a Journal of science communication Vol 1, NO.2, July, 2010, pages 124–132, National Council of Science Museums, Kolkata, India, by S.M Khened,[https://web.archive.org/web/20110721161448/http://ncsm.gov.in/science_pdf/Propagation%20Vol%202%20-%2008%20Science%20Centres.pdf]. * ''History of Science in South Asia'' ([http://hssa-journal.org hssa-journal.org]). HSSA is a peer-reviewed, open-access, online journal for the history of science in India. {{Indianscience}} {{Science and technology in Pakistan}} {{History of science}} {{History of technology}} {{DEFAULTSORT:History Of Indian Science And Technology}}{{South Asian topics}} [[Category:Indian History]] 5e9e69120e3808d619abac361fc18f1fbe67d28f Gupta Empire 0 658 1368 1337 2024-03-18T09:13:13Z Motzoid India 2 wikitext text/x-wiki <div style="float: right; margin-left: 15px; border: 1px solid #aaa; padding: 5px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Gupta Empire''' |- ! colspan="2" style="text-align:center; font-size: 110%;" | Gupta Empire |- | colspan="2" style="text-align:center;" | [[File:Gupta_Empire_map.png|250px|alt=Map of Gupta Empire|Map of Gupta Empire]] |- ! Established | c. 320 CE |- ! Disestablished | c. 550 CE |- ! Capital | Pataliputra |- ! Government | Monarchy |- ! Religion | Hinduism, Buddhism |- ! Language | Sanskrit |- ! Currency | Gold coins (Dinar), Silver coins (Rupaka) |- ! Area | ~5 million km² |- ! Major cities | Pataliputra, Ayodhya, Varanasi |- ! Founder | Sri Gupta |- ! Successor | Later Gupta dynasty |- ! Key Figures | Chandragupta I, Samudragupta, Chandragupta II |} </div> The '''Gupta Empire''' was an ancient Indian empire which existed from the early 4th century CE to early 6th century CE. At its zenith, from approximately 319 to 467 CE, it covered much of the Indian subcontinent. This period has been considered as the Golden Age of India by some historians,although this characterisation has been disputed by other historians. The ruling dynasty of the empire was founded by Gupta, and the most notable rulers of the dynasty were Chandragupta I, Samudragupta, Chandragupta IIand Skandagupta. The 5th-century <small>CE</small> Sanskrit poet Kalidasa credits the Guptas with having conquered about twenty-one kingdoms, both in and outside India, including the kingdoms of Parasikas, the Hunas, the Kambojas, tribes located in the west and east Oxus valleys, the Kinnaras, Kiratas, and others. The high points of this period are the great cultural developments which took place primarily during the reigns of Samudragupta, Chandragupta II and Kumaragupta I. Many Hindu epics and literarysources, such as Mahabharataand Ramayana, were canonised during this period. The Gupta period produced scholars such as Kalidasa, Aryabhata, Varahamihira and Vatsyayana, who made great advancements in many academic fields. Science and political administration reached new heights during the Gupta era. The period, sometimes described as ''Pax Gupta'', gave rise to achievements in architecture, sculpture, and painting that "set standards of form and taste [that] determined the whole subsequent course of art, not only in India but far beyond her borders". Strong trade ties also made the region an important cultural centre and established the region as a base that would influence nearby kingdoms and regions in India and Southeast Asia.<sup>[''unreliable source?'']</sup> The Puranas, earlier long poems on a variety of subjects, are also thought to have been committed to written texts around this period. Hinduism was followed by the rulers and the Brahmins flourished in the Gupta empire but the Guptas tolerated people of other faiths as well. The empire eventually died out because of factors such as substantial loss of territory and imperial authority caused by their own erstwhile feudatories, as well as the invasion by the Huna peoples (Kidarites and Alchon Huns) from Central Asia.After the collapse of the Gupta Empire in the 6th century, India was again ruled by numerous regional kingdoms. == Origin == Main article: Origin of the Gupta dynasty The homeland of the Guptas is uncertain. According to one theory, they originated in the present-day lower-Doab region of Bihar and Uttar Pradesh, where most of the inscriptions and coin hoards of the early Gupta kings have been discovered. This theory is also supported by the Purana, as argued by the proponents, that mention the territory of the early Gupta kings as Prayaga, Saketa, and Magadhaareas in the Ganges basin. Another prominent theory locates the Gupta homeland in the present-day Bengal region in Ganges basin, based on the account of the 7th-century Chinese Buddhist monk Yijing. According to Yijing, king Che-li-ki-to (identified with the dynasty's founder ''Shri'' Gupta) built a temple for Chinese pilgrims near Mi-li-kia-si-kia-po-no (apparently a transcription of Mriga-shikha-vana). Yijing states that this temple was located more than 40 ''yojanas'' east of Nalanda, which would mean it was situated somewhere in the modern Bengal region. Another proposal is that the early Gupta kingdom extended from Prayaga in the west to northern Bengal in the east. The Gupta records do not mention the dynasty's varna (social class). Some historians, such as A.S. Altekar, have theorised that they were of Vaishya origin, as certain ancient Indian texts prescribe the name "Gupta" for the members of the Vaishya varna. According to historian R. S. Sharma, the Vaishyas – who were traditionally associated with trade – may have become rulers after resisting oppressive taxation by the previous rulers. Critics of the Vaishya-origin theory point out that the suffix Gupta features in the names of several non-Vaishyas before as well as during the Gupta period, and the dynastic name "Gupta" may have simply derived from the name of the family's first king Gupta. Some scholars, such as S. R. Goyal, theorise that the Guptas were Brahmanas, because they had matrimonial relations with Brahmans, but others reject this evidence as inconclusive. Based on the Pune and Riddhapur inscriptions of the Gupta princess Prabhavati-gupta, some scholars believe that the name of her paternal gotra (clan) was "Dharana", but an alternative reading of these inscriptions suggests that Dharana was the ''gotra'' of her mother Kuberanaga. == History == Gupta (Gupta script:  ''gu-pta'', fl. late 3rd century CE) is the earliest known king of the dynasty: different historians variously date the beginning of his reign from mid-to-late 3rd century CE. Gupta founded the Gupta Empire <abbr>c.</abbr> 240-280 CE, and was succeeded by his son, Ghatotkacha, <abbr>c.</abbr> 280-319 CE, followed by Ghatotkacha's son, Chandragupta I, <abbr>c.</abbr> 319-335 CE. "Che-li-ki-to", the name of a king mentioned by the 7th century Chinese Buddhist monk Yijing, is believed to be a transcription of "Shri-Gupta" (IAST: Śrigupta), "Shri" being an honorific prefix. According to Yijing, this king built a temple for Chinese Buddhist pilgrims near "Mi-li-kia-si-kia-po-no" (believed to be a transcription of Mṛgaśikhāvana). In the Allahabad Pillar inscription, Gupta and his successor Ghatotkacha are described as ''Maharaja'' ("great king"), while the next king Chandragupta I is called a ''Maharajadhiraja'' ("king of great kings"). In the later period, the title ''Maharaja'' was used by feudatory rulers, which has led to suggestions that Gupta and Ghatotkacha were vassals (possibly of Kushan Empire).However, there are several instances of paramount sovereigns using the title ''Maharaja'', in both pre-Gupta and post-Gupta periods, so this cannot be said with certainty. That said, there is no doubt that Gupta and Ghatotkacha held a lower status and were less powerful than Chandragupta I. Chandragupta I married the Licchavi princess Kumaradevi, which may have helped him extend his political power and dominions, enabling him to adopt the imperial title ''Maharajadhiraja''. According to the dynasty's official records, he was succeeded by his son Samudragupta. However, the discovery of the coins issued by a Gupta ruler named Kachahave led to some debate on this topic: according to one theory, Kacha was another name for Samudragupta; another possibility is that Kacha was a rival claimant to the throne. === Samudragupta === See also: Samudragupta and Gupta conquests of Bengal Samudragupta succeeded his father around 335 or 350 CE, and ruled until <abbr>c.</abbr> 375 CE. The Allahabad Pillar inscription, composed by his courtier Harishena, credits him with extensive conquests. The inscription asserts that Samudragupta uprooted 8 kings of Āryāvarta, the northern region, including the Nagas. It further claims that he subjugated all the kings of the forest region, which was most probably located in central India. It also credits him with defeating 12 rulers of Dakshinapatha, the southern region: the exact identification of several of these kings is debated among modern scholars, but it is clear that these kings ruled areas located on the eastern coast of India.The inscription suggests that Samudragupta advanced as far as the Pallava kingdom in the south, and defeated Vishnugopa, the Pallava regent of Kanchi. During this southern campaign, Samudragupta most probably passed through the forest tract of central India, reached the eastern coast in present-day Odisha, and then marched south along the coast of the Bay of Bengal. Evolution of Gupta territory, with neighbouring polities The Allahabad Pillar inscription mentions that rulers of several frontier kingdoms and tribal oligarchiespaid Samudragupta tributes, obeyed his orders, and performed obeisance before him. The frontier kingdoms included Samatata, Davaka, Kamarupa, Nepala and Karttripura. The tribal oligarchies included Malavas, Arjunayanas, Yaudheyas, Madrakas, and Abhiras, among others. Finally, the inscription mentions that several foreign kings tried to please Samudragupta by personal attendance; offered him their daughters in marriage (or according to another interpretation, gifted him maidens); and sought the use of the Garuda-depicting Gupta seal for administering their own territories.This is an exaggeration: for example, the inscription lists the king of Simhala among these kings. It is known that from Chinese sources that the Simhala king Meghavarna sent rich presents to the Gupta king requesting his permission to build a Buddhist monastery at Bodh Gaya: Samudragupta's panegyrist appears to have described this act of diplomacy as an act of subservience. Samudragupta appears to have been Vaishnavite, as attested by his Eran inscription, and performed several Brahmanicalceremonies. The Gupta records credit him with making generous donations of cows and gold. He performed the Ashvamedha ritual (horse sacrifice), which was used by the ancient Indian kings to prove their imperial sovereignty, and issued gold coins (see Coinage below) to mark this performance. The Allahabad Pillar inscription presents Samudragupta as a wise king and strict administrator, who was also compassionate enough to help the poor and the helpless. It also alludes to the king's talents as a musician and a poet, and calls him the "king of poets". Such claims are corroborated by Samudragupta's gold coins, which depict him playing a veena. Samudragupta appears to have directly controlled a large part of the Indo-Gangetic Plain in present-day India, as well as a substantial part of central India. Besides, his empire comprised a number of monarchical and tribal tributary states of northern India, and of the south-eastern coastal region of India. === Ramagupta === Main article: Ramagupta Ramagupta is known from a sixth-century play, the ''Devichandragupta'', in which he surrenders his wife to the enemy Sakas and his brother Chandragupta has to sneak into the enemy camp to rescue her and kill the Saka king. The historicity of these events is unclear, but Ramagupta's existence is confirmed by three Jain statues found at Durjanpur, with inscriptions referring to him as the ''Maharajadhiraja''. A large number of his copper coins also have been found from the Eran-Vidisha region and classified in five distinct types, which include the ''Garuda'', ''Garudadhvaja'', ''lion'' and ''border legend''types. The Brahmi legends on these coins are written in the early Gupta style. === Chandragupta II "Vikramaditya" === Main article: Chandragupta II See also: Gupta conquests of Bengal According to the Gupta records, amongst his sons, Samudragupta nominated prince Chandragupta II, born of queen Dattadevi, as his successor. Chandragupta II, ''Vikramaditya''(Victory of the Sun), ruled from 375 until 415. He married a Kadamba princess of Kuntala and of Naga lineage (''Nāgakulotpannnā''), Kuberanaga. His daughter Prabhavatiguptafrom this Naga queen was married to Rudrasena II, the Vakatakaruler of Deccan. His son Kumaragupta I was married to a Kadamba princess of the Karnataka region. Chandragupta II expanded his realm westwards, defeating the Saka Western Kshatrapas of Malwa, Gujarat and Saurashtra in a campaign lasting until 409. His main opponent Rudrasimha III was defeated by 395, and he crushed the Bengal chiefdoms. This extended his control from coast to coast, established a second capital at Ujjain and was the high point of the empire.<sup>[''citation needed'']</sup> Kuntala inscriptions indicate rule of Chandragupta in Kuntala region of Indian state of Karnataka. Hunza inscription also indicate that Chandragupta was able to rule north western Indian subcontinent and proceeded to conquer Balkh, although some scholars have also disputed the identity of gupta king. Chalukyan ruler Vikramditya VI (r. 1076 – 1126 CE) mentions Chandragupta with his title and states"why should the glory of the Kings Vikramaditya and Nanda be a hindrance any longer ? he with a loud command abolished that (era), which has the name of Saka, and made that (era) which has the Chalukya counting". Despite the creation of the empire through war, the reign is remembered for its very influential style of Hindu art, literature, culture and science, especially during the reign of Chandragupta II. Some excellent works of Hindu art such as the panels at the Dashavatara Temple in Deogarh serve to illustrate the magnificence of Gupta art. Above all, it was the synthesis of elements that gave Gupta art its distinctive flavour. During this period, the Guptas were supportive of thriving Buddhist and Jaincultures as well, and for this reason, there is also a long history of non-Hindu Gupta period art. In particular, Gupta period Buddhist art was to be influential in most of East and Southeast Asia. Many advances were recorded by the Chinese scholar and traveller Faxian in his diary and published afterwards. The court of Chandragupta was made even more illustrious by the fact that it was graced by the ''Navaratna'' (Nine Jewels), a group of nine who excelled in the literary arts. Amongst these men was Kālidāsa, whose works dwarfed the works of many other literary geniuses, not only in his own age but in the years to come. Kalidasa was mainly known for his subtle exploitation of the ''shringara'' (romantic) element in his verse. ==== Chandragupta II's campaigns against foreign tribes ==== The 4th century Sanskrit poet Kalidasa credits Chandragupta Vikramaditya with conquering about twenty-one kingdoms, both in and outside India. After finishing his campaign in East and West India, Vikramaditya (Chandragupta II) proceeded northwards, subjugated the Parasikas, then the Hunas and the Kambojas tribes located in the west and east Oxus valleys respectively. Thereafter, the king proceeded into the Himalaya mountains to reduce the mountain tribes of the Kinnaras, Kiratas, as well as India proper.<sup>[''non-primary source needed'']</sup> In one of his works Kalidasa also credits him with the removal of the Sakas from the country. He wrote 'Wasn't it Vikramaditya who drove the Sakas out from the lovely city of Ujjain?'. The ''Brihatkathamanjari'' of the Kashmiri writer Kshemendrastates, King Vikramaditya (Chandragupta II) had "unburdened the sacred earth of the Barbarians like the Sakas, Mlecchas, Kambojas, Yavanas, Tusharas, Parasikas, Hunas, and others, by annihilating these sinful Mlecchas completely".<sup>[''non-primary source needed''][''unreliable source?'']</sup> ==== Faxian ==== Faxian, a Chinese Buddhist, was one of the pilgrims who visited India during the reign of the Gupta emperor Chandragupta II. He started his journey from China in 399 <small>CE</small> and reached India in 405 <small>CE</small>. During his stay in India up to 411 <small>CE</small>, he went on a pilgrimage to Mathura, Kannauj, Kapilavastu, Kushinagar, Vaishali, Pataliputra, Kashi, and Rajagriha, and made careful observations about the empire's conditions. Faxian was pleased with the mildness of administration. The Penal Code was mild, and offences were punished by fines only. From his accounts, the Gupta Empire was a prosperous period. His writings form one of the most important sources for the history of this period. Faxian on reaching Mathura comments––<blockquote>"The snow and heat are finely tempered, and there is neither hoarfrost nor snow. The people are numerous and happy. They have not to register their households. Only those who cultivate the royal land have to pay (a portion of) the gain from it. If they want to go, they go. If they want to stay on, they stay on. The king governs without decapitation or (other) corporal punishments. Criminals are simply fined according to circumstances. Even in cases of repeated attempts at wicked rebellion, they only have their right-hand cut off. The king's bodyguards & attendants all have salaries. Throughout the whole country, the people do not kill any living creature, not drink any intoxicating liquor, nor eat onions or garlic."</blockquote> === Kumaragupta I === Main article: Kumaragupta I Chandragupta II was succeeded by his second son Kumaragupta I, born of ''Mahadevi'' Dhruvasvamini. Kumaragupta I assumed the title, ''Mahendraditya''. He ruled until 455. Towards the end of his reign a tribe in the Narmada valley, the Pushyamitras, rose in power to threaten the empire. The Kidarites as well probably confronted the Gupta Empire towards the end of the rule of Kumaragupta I, as his son Skandaguptamentions in the Bhitari pillar inscription his efforts at reshaping a country in disarray, through reorganisation and military victories over the Pushyamitras and the Hunas. He was the founder of Nalanda University which on 15 July 2016 was declared as a UNESCO world heritage site.Kumaragupta I was also a worshipper of Kartikeya. [[Category:Indian History]] 83b04e64583413beb4034839cacafe9be27ee5ef Category:Indian History 14 669 1369 2024-03-18T09:13:43Z Motzoid India 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Aerialgram 0 670 1370 2024-03-18T09:32:51Z Motzoid India 2 Created page with "Aerialgram is an free to use social media application for iOS and android. it is developed under [[Motzoid India]]. The development of the app started in May 2022 and it was planned to be release by the name of PhotoParcel but [[Dhumik Pravin]] (Developer) changed the name to Aerialgram in late August and launched it as first indian social media application." wikitext text/x-wiki Aerialgram is an free to use social media application for iOS and android. it is developed under [[Motzoid India]]. The development of the app started in May 2022 and it was planned to be release by the name of PhotoParcel but [[Dhumik Pravin]] (Developer) changed the name to Aerialgram in late August and launched it as first indian social media application. 5a4677d877d51d3759a2dfbd1f9105c4507c6139 1371 1370 2024-03-18T09:33:38Z Motzoid India 2 wikitext text/x-wiki Aerialgram is an free to use social media application for iOS and android. it is developed under [[Motzoid India]]. The development of the app started in May 2022 and it was planned to be release by the name of PhotoParcel but [[Dhumik Pravin]] (Developer) changed the name to Aerialgram in late August and launched it as first indian social media application. [[Category:Motzoid India]] 0611b0e654bdec6385f16b233526c8ebf99c8326 Motzoid Entertainment 0 671 1372 2024-03-18T09:40:30Z Motzoid India 2 Created page with "Motzoid Entertainment was formed in January 2023 as a Entertainment and film production YouTube channel. Motzoid Entertainment is a sub-Channel of [[Motzoid India]] and upload entertainment contents such as Wedding videos, and animations. [[Category:Motzoid India]]" wikitext text/x-wiki Motzoid Entertainment was formed in January 2023 as a Entertainment and film production YouTube channel. Motzoid Entertainment is a sub-Channel of [[Motzoid India]] and upload entertainment contents such as Wedding videos, and animations. [[Category:Motzoid India]] 49a3caa912e922637a4d913834a4863c65b4153d Motzoid India 0 568 1373 1161 2024-03-18T09:47:47Z Motzoid India 2 /* Products */ wikitext text/x-wiki Motzoid India is an Indian content creator who mainly releases their content on YouTube. It was founded by [[Dhumik Pravin]] in 2021 as an Entertainment YouTube Channel under the name of Motzoid. Later in 2022, it was renamed Motzoid India and established as a media conglomerate YouTube channel. == History == Motzoid was formed after the defunct of the Music YouTube channel named DP Live Music Production founded by Dhumik Pravin in 2021. During their first few months, they started to create long-form content on YouTube however being a single individual, it was hard for Dhumik to make hours of long-form content. However, YouTube launched its new feature of Shorts in September 2020 which led Dhumik to create short-form videos on his channel. Dhumik started uploading his short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin's wedding and entertainment content. On the main channel, currently, Dhumik has started to upload short-form videos of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand short forms and plans to start new short ideas. == Products == As a content creator, Motzoid has launched various products and services developed by them. * [[Aerialgram]] - A social media application launched on 17 July 2023. * [[Aryavartpedia]] - An Indian free-to-use Encloypedia launched on 19 February 2024. *[[Motzoid Music]] - an Indian music record label under Motzoid India. *[[Motzoid Entertainment]] - an sub-youtube channel [[Category:Motzoid India]] [[Category:YouTube Channels]] 0e5b75df6759f4f48cfffb21ca63de5586e905f2 Aryavartpedia:About 4 672 1374 2024-03-18T09:48:42Z Motzoid India 2 Redirected page to [[Aryavartedia]] wikitext text/x-wiki #REDIRECT [[Aryavartedia]] de4be1609436dec78182b703459cc55133a91f7c 1375 1374 2024-03-18T09:49:04Z Motzoid India 2 Changed redirect target from [[Aryavartedia]] to [[Aryavartpedia]] wikitext text/x-wiki #REDIRECT [[Aryavartpedia]] 41b2ab1c6f606742b49f8a8da9dc27b973a2aea7 Aryavartpedia 0 25 1376 1165 2024-03-18T09:49:48Z Motzoid India 2 wikitext text/x-wiki Aryavartpedia is an Indian encyclopedia website founded by [[Motzoid India]] and hosted by Miraheze. It was formed on 19 February 2024. [[Category:Motzoid India]] [[Category:Encyclopedia Websites]] 2d8a8e84033450eea5ae2c286fc62979601ddf76 Dhumik Pravin 0 4 1377 1170 2024-03-18T09:57:47Z Motzoid India 2 wikitext text/x-wiki {| class="infobox" style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;" |+ '''Dhumik Pravin''' |- ! Birth date | February 18, 2007 (age 17) |- ! Place of birth | Diu, India |- ! Organisation founded | Motzoid India |- ! Occupation | Youtuber |} '''Dhumik Pravin''' (18 February 2007), is an [[Indian]] [[YouTuber]] and [[music producer]] who is the founder of [[Motzoid India]] which is a well established YouTube Channel. He has produced around 3-4 Songs which mainly are instrumental and devotional genre. == Biography == Born on 18 February 2007 into a Gujarati [[Hindu]] Family in [[Diu]]. In 2014, Dhumik and his family moved to [[Leicester]], [[UK]] for a better future. He started his junior education at Bridge Junior school and after went to The City Of Leicester College for his secondary and GCSE education in 2018. At an early age of 8, Dhumik started his first YouTube channel named Dhumik Pravin. He upload many video from different platforms however, due to copyright infringement, Dhumik had to close the channel. In 2018, Dhumik started another channel named DP Live where he used to upload gameplays of different games however, the channel did not get it reach. He moved to different category into the Music sector. However the music he uploaded were protected by many big music companies such as T-Series and Zee Music Company. Due to this, he knew that he would not be able to go far. Later in 2021, He founded Motzoid India as an YouTube Channel and started uploading his own short contents. He created lyrical videos of Bhajans which gained a good number of Views and subscribers. After gaining success on the first channel which gained over 25,000 subscribers. He started a new channel named Motzoid Entertainment where he uploaded his cousin wedding and entertainment contents. In the main channel, currently Dhumik has started to upload the Short form video of the Bhagavad Gita’s shlokas from the first chapter to the last in English with translation. He also uploads Sunderkand shorts forms and planing to started new shorts ideas. [[Category:Living people]] [[Category:Motzoid India]] c8281dddbc4e1ac1162e7af6f18f1cba3296c456 Indian 0 673 1378 2024-03-18T09:58:56Z Motzoid India 2 Created page with "'''Indian people''' or '''Indians''' are the citizens and nationals of the [[India|Republic of India]]. In 2022, the population of India stood at 1.4 billion people. According to UN forecasts, India overtook China as the world's most populous country by the end of April 2023, containing 17.50 percent of the global population. In addition to the Indian population, the Indian overseas diaspora also boasts large numbers, particularly in the Arab states of the Persian Gulf a..." wikitext text/x-wiki '''Indian people''' or '''Indians''' are the citizens and nationals of the [[India|Republic of India]]. In 2022, the population of India stood at 1.4 billion people. According to UN forecasts, India overtook China as the world's most populous country by the end of April 2023, containing 17.50 percent of the global population. In addition to the Indian population, the Indian overseas diaspora also boasts large numbers, particularly in the Arab states of the Persian Gulf and the Western world. While the demonym "Indian" applies to people originating from the present-day Republic of India, it was also used as the identifying term for people originating from what is now Pakistan and Bangladesh prior to the Partition of India in 1947. Particularly in North America, the terms "Asian Indian" and "East Indian" are sometimes used to differentiate Indians from the indigenous peoples of the Americas. Although the misidentification of indigenous Americans as Indians occurred during the European colonization of the Americas, the term "Indian" is still used as an identifier for indigenous populations in North America and the Caribbean. This usage is growing rarer, as terms such as indigenous, Amerindian, and specifically First Nations in Canada, and Native American in the United States, are widely used in official discourse and in law. == Ethnonym == The name ''Bhārata'' has been used as a self-ascribed name by people of the Indian subcontinent and the Republic of India since 1949. The designation ''"Bhārata"'' appears in the official Sanskrit name of the country, ''Bhārata Gaṇarājya''. The name is derived from the ancient Vedic and Puranas, which refer to the land that comprises India as "''Bhārata varṣam''" and uses this term to distinguish it from other ''varṣa''s or continents. The ''Bhāratas'' were a vedic tribe mentioned in the Rigveda, notably participating in the Battle of the Ten Kings. India is named after legendary Emperor Bharata who was a descendant of the Bhāratas tribe, scion of Kuru Dynasty who unified the Indian Subcontinent under one realm.<blockquote> : उत्तरं यत्समुद्रस्य हिमाद्रेश्चैव दक्षिणम्। : वर्षं तद् भारतं नाम भारती यत्र संततिः॥ </blockquote> : "The country (''varṣam'') that lies north of the ocean and south of the snowy mountains is called ''Bhāratam''; there dwell the descendants of Bharata." In early Vedic literature, the term ''Āryāvarta'' (Sanskrit: आर्यावर्त) was in popular use before ''Bhārata''. The Manusmṛti (2.22) gives the name ''Āryāvarta'' to "the tract between the Himalaya and the Vindhya ranges, from the Eastern (Bay of Bengal) to the Western Sea (Arabian Sea)". While the word Indian and India is derived from Greek Ἰνδία (''Indía''), via Latin ''India''. ''Indía'' in Koine Greek denoted the region beyond the Indus (Ἰνδός) river, since Herodotus (5th century BC) ἡ Ἰνδική χώρη, ''hē Indikē chōrē''; "the Indian land", Ἰνδός, ''Indos'', "an Indian", from Old Persian ''Hinduš'' and medieval term Hindustani. The name is derived ultimately from ''Sindhu'', the Sanskrit name of the river Indus, but also meaning "river" generically. 72837e556cb53dca9ff3fd5e98379c5c1b817ab9 India 0 3 1379 4 2024-03-18T10:03:06Z Motzoid India 2 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''India''' |- ! flag | File:Flag of India.svg |- ! motto | "Satyameva Jayate" (Truth Alone Triumphs) |- ! anthem | "Jana Gana Mana" (Thou Art the Ruler of the Minds of All People) |- ! capital | New Delhi |- ! largest_city | Mumbai |- ! official_lang | Hindi, English |- ! recognized_langs | 22 official languages including Bengali, Telugu, Marathi, Tamil, Urdu, Gujarati, Malayalam, Kannada, Oriya, Punjabi, Assamese, Maithili, Santali, Kashmiri, Nepali, Konkani, Sindhi, Dogri, Manipuri, Bodo, Sanskrit |- ! government | Federal parliamentary constitutional republic |- ! president | Ram Nath Kovind |- ! prime_minister | Narendra Modi |- ! independence | from the United Kingdom |- ! declared | 15 August 1947 |- ! area | 3,287,263 km² (1,269,219 sq mi) (7th) |- ! population | 1,437,986,116 (1st) |- ! gdp_nominal | $3.202 trillion (5th) |- ! gdp_ppp | $10.386 trillion (3rd) |- ! currency | Indian Rupee (₹) (INR) |- ! time_zone | Indian Standard Time (IST) (UTC+05:30) |- ! driving_side | left |- ! calling_code | +91 |- ! iso_code | IN |} </div> ''India''', officially the '''Republic of India''' (ISO: ''Bhārat Gaṇarājya''), is a country in South Asia. It is the seventh-largest country by area; the most populous country as of June 2023; and from the time of its independence in 1947, the world's most populous democracy. Bounded by the Indian Ocean on the south, the Arabian Sea on the southwest, and the Bay of Bengal on the southeast, it shares land borders with Pakistan to the west;China, Nepal, and Bhutan to the north; and Bangladesh and Myanmar to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; its Andaman and Nicobar Islands share a maritime border with Thailand, Myanmar, and Indonesia. Modern humans arrived on the Indian subcontinent from Africa no later than 55,000 years ago. Their long occupation, initially in varying forms of isolation as hunter-gatherers, has made the region highly diverse, second only to Africa in human genetic diversity. Settled lifeemerged on the subcontinent in the western margins of the Indus river basin 9,000 years ago, evolving gradually into the Indus Valley Civilisation of the third millennium BCE.By 1200 BCE, an archaic form of Sanskrit, an Indo-European language, had diffusedinto India from the northwest. Its evidence today is found in the hymns of the ''Rigveda''. Preserved by an oral tradition that was resolutely vigilant, the ''Rigveda''records the dawning of Hinduism in India. The Dravidian languages of India were supplanted in the northern and western regions. By 400 BCE, stratification and exclusion by caste had emerged within Hinduism, and Buddhism and Jainism had arisen, proclaiming social orders unlinked to heredity. Early political consolidations gave rise to the loose-knit Maurya and Gupta Empires based in the Ganges Basin. Their collective era was suffused with wide-ranging creativity, but also marked by the declining status of women, and the incorporation of untouchability into an organised system of belief. In South India, the Middle kingdoms exported Dravidian-languages scripts and religious cultures to the kingdoms of Southeast Asia. == Etymology == The name "India" is derived from the River Indus, which flows through the northwest of the country. The ancient Greeks referred to the region as "Indoi," which eventually evolved into "India." == History == === Prehistoric Period === India has a rich history spanning thousands of years. The earliest known human settlements in the Indian subcontinent date back to the Paleolithic Age, around 400,000 years ago. Evidence of early human activity has been found in various archaeological sites across the country, including the Bhimbetka rock shelters in Madhya Pradesh. === Indus Valley Civilization === One of the world's oldest civilizations, the Indus Valley Civilization (c. 3300–1300 BCE), flourished in the northwestern region of the Indian subcontinent. Excavations at sites such as Harappa, Mohenjo-Daro, and Lothal have revealed sophisticated urban planning, advanced drainage systems, and intricate artwork, indicating a highly developed ancient society. === Vedic Period === Around 1500 BCE, Indo-Aryan tribes migrated into the Indian subcontinent, bringing with them the Vedic culture and language. The Vedic texts, including the Rigveda and the Upanishads, provide insights into the early religious and social practices of ancient India. The caste system, which divided society into distinct social classes, emerged during this period. === Maurya and Gupta Empires === In the first millennium BCE, several powerful kingdoms and empires rose and fell across the Indian subcontinent. The Maurya Empire (c. 322–185 BCE), under the rule of Chandragupta Maurya and his grandson Ashoka the Great, unified much of the Indian subcontinent and promoted Buddhism. The Gupta Empire (c. 320–550 CE) is often referred to as the "Golden Age" of India, marked by significant advancements in art, science, mathematics, and literature. === Medieval Period === From the 8th to the 16th centuries, India witnessed the rise and fall of various dynasties, including the Chola, Chalukya, Rashtrakuta, and Vijayanagara empires in the south, and the Delhi Sultanate and Mughal Empire in the north. These periods saw significant cultural exchanges, architectural marvels such as the Taj Mahal, and the spread of Islam across the Indian subcontinent. === Colonial Era === The arrival of European traders, starting with the Portuguese in the late 15th century, marked the beginning of European colonialism in India. The British East India Company gradually expanded its influence, culminating in the establishment of British colonial rule by the mid-19th century. India became the "Jewel in the Crown" of the British Empire, enduring centuries of exploitation, economic drain, and social upheaval. === Indian Independence Movement === The struggle for independence from British rule gained momentum in the late 19th and early 20th centuries, led by figures such as Mahatma Gandhi, Jawaharlal Nehru, and Subhas Chandra Bose. The nonviolent civil disobedience campaigns, such as the Salt March and Quit India Movement, played a crucial role in India's eventual independence in 1947. === Post-Independence === India was partitioned upon independence, resulting in the creation of two separate nations, India and Pakistan. The partition led to widespread violence and the displacement of millions of people. India adopted a democratic constitution, becoming a sovereign republic on January 26, 1950. The country has since made significant strides in various fields, including agriculture, industry, technology, and space exploration. === Geography and Climate === India is a vast country with diverse geographical features, including the Himalayas in the north, fertile plains of the Ganges and Indus rivers, Thar Desert in the west, and dense forests in the central and southern regions. The country experiences a wide range of climates, from tropical in the south to temperate in the north, with monsoon rains playing a crucial role in the agricultural economy. === Demographics === India is home to a diverse population comprising various ethnicities, languages, religions, and cultures. The country's official language is Hindi, while English is also widely used for official and administrative purposes. Hinduism is the predominant religion, followed by Islam, Christianity, Sikhism, Buddhism, and Jainism. === Economy === India has emerged as one of the world's fastest-growing major economies, driven by sectors such as information technology, telecommunications, manufacturing, and agriculture. The country is also known for its vibrant startup ecosystem and is home to several multinational corporations. However, India faces challenges such as poverty, income inequality, and environmental degradation. === Culture === Indian culture is characterized by its diversity, influenced by centuries of interactions with various civilizations and cultures. The country's cultural heritage encompasses art, music, dance, cuisine, festivals, and traditional practices. Indian classical music, dance forms such as Bharatanatyam and Kathak, and festivals like Diwali and Holi are celebrated worldwide. India's rich history, cultural heritage, and remarkable journey from ancient civilizations to a modern nation make it a fascinating and dynamic country. With its vast landscapes, diverse demographics, and vibrant culture, India continues to captivate the world and inspire generations across the globe. e90938cf1a2b2a4fe396969b50c8bc6050cd202e Holi 0 674 1380 2024-03-18T15:50:15Z 80.5.18.102 0 Created page with "'''Holi''' (Hindi pronunciation: ['hoːli:]) is a popular and significant Hindu festival celebrated as the '''Festival of Colours''', '''Love''', and '''Spring'''. It celebrates the eternal and divine love of the deities Radha and Krishna. Additionally, the day signifies the triumph of good over evil, as it commemorates the victory of Vishnu as Narasimha over Hiranyakashipu. Holi originated and is predominantly celebrated in the Indian subcontinent, but has also spread t..." wikitext text/x-wiki '''Holi''' (Hindi pronunciation: ['hoːli:]) is a popular and significant Hindu festival celebrated as the '''Festival of Colours''', '''Love''', and '''Spring'''. It celebrates the eternal and divine love of the deities Radha and Krishna. Additionally, the day signifies the triumph of good over evil, as it commemorates the victory of Vishnu as Narasimha over Hiranyakashipu. Holi originated and is predominantly celebrated in the Indian subcontinent, but has also spread to other regions of Asia and parts of the Western world through the Indian diaspora. Holi also celebrates the arrival of Spring in India, the end of winter, and the blossoming of love. It is also an invocation for a good spring harvest season. It lasts for a night and a day, starting on the evening of the Purnima (full moon day) falling on the Hindu calendar month of Phalguna, which falls around the middle of March in the Gregorian calendar. == Names == ''Holi'' (Hindi: होली, Gujarati: હોળી, Kannada: ಹೋಳಿ, Marathi: होळी, Nepali: होली, Punjabi: ਹੋਲੀ, Telugu: హోళి) is also known as ''Dol Jatra'' (swing festival") and ''Bôshonto Utshôb'' (Bengali: বসন্ত উৎসব) ("spring festival") in Bengal (West Bengal and Bangladesh), ''Dôl Jātrā'' (Assamese: দ’ল যাত্ৰা) in Assam, ''Phāgu Pūrṇimā'' (Nepali: फागु पूर्णिमा) in the hilly region of Nepal, ''Dola jātra'' (Odia: ଦୋଳଯାତ୍ରା) in Odisha, ''Fagua'' or ''Phagua'' (Bhojpuri: फगुआ) in eastern Uttar Pradesh, western Bihar, and northeastern Jharkhand, ''Phagwah'' (Caribbean Hindustani: पगवा) in the Caribbean (namely Trinidad and Tobago, Guyana, Suriname, and Jamaica), and ''Phagua'' (Fiji Hindi: पगवा) in Fiji. The main day of the celebration is known as "Holi", "Rangwali Holi", "Dol Purnima", "Dhuleti", "Dhulandi", "Ukuli", "Manjal Kuli", "Yaosang", "Shigmo", "Phagwah", or "Jajiri". == Description == Holi is a sacred ancient tradition of Hindus, a holiday in many states of India and Nepal with regional holidays in other countries. It is a cultural celebration that gives Hindus and non-Hindus alike an opportunity to have fun banter with other people by throwing coloured water and powder at each other. It is also observed broadly on the Indian subcontinent. Holi is celebrated at the end of winter, on the last full moon day of the Hindu luni-solar calendar month, marking the spring, making the date vary with the lunar cycle. The date falls typically in March, but sometimes late February of the Gregorian calendar. The festival has many purposes; most prominently, it celebrates the beginning of Spring. In 17th century literature, it was identified as a festival that celebrated agriculture, commemorated good spring harvests, and the fertile land. Hindus believe it is a time to enjoying spring's abundant colours and saying farewell to winter. To many Hindus, Holi festivities mark an occasion to reset and renew ruptured relationships, end conflicts, and rid themselves of accumulated emotional impurities from the past. It also has a religious purpose, symbolically signified by the legend of Holika. The night before Holi, bonfires are lit in a ceremony known as Holika Dahan (burning of Holika) or Little Holi. People gather near fires, sing and dance. The next day, Holi, also known as ''Dhuli'' in Sanskrit, or ''Dhulheti'', ''Dhulandi'' or ''Dhulendi'', is celebrated. In Northern parts of India, children and youth spray coloured powder solutions (''gulal'') at each other, laugh and celebrate, while adults smear dry coloured powder (''abir'') on each other's faces. Visitors to homes are first teased with colours, then served with Holi delicacies (such as ''gujia, shakkarpaare, matri, and dahi-bada''), desserts and drinks. After playing with colours, and cleaning up, people bathe, put on clean clothes, and visit friends and family. Like Holika Dahan, ''Kama Dahanam'' is celebrated in some parts of India. The festival of colours in these parts is called ''Rangapanchami'', and occurs on the fifth day after Poornima (full moon). == History == The Holi festival is an ancient Hindu festival with its own cultural rituals which emerged before the Gupta period. The festival of colours finds mentioned in numerous scriptures, such as in works like Jaimini's ''Purva Mimamsa Sutras'' and ''Kathaka-Grhya-Sutras'' with even more detailed descriptions in ancient texts like the ''Narada Purana'' and ''Bhavishya Purana''. The festival of ''"holikotsav"'' was also mentioned in the 7th century work, ''Ratnavali'', by King Harsha. It is mentioned in the ''Puranas'', ''Dasakumara Charita'' by Daṇḍin, and by the poet Kālidāsa during the 4th century reign of Chandragupta II. The celebration of Holi is also mentioned in the 7th-century Sanskrit drama ''Ratnavali''. The festival of Holi caught the fascination of European traders and British colonial staff by the 17th century. Various old editions of the Oxford English Dictionary mention it, but with varying, phonetically derived spellings: ''Houly'' (1687), ''Hooly'' (1698), ''Huli'' (1789), ''Hohlee'' (1809), ''Hoolee'' (1825), and ''Holi'' in editions published after 1910. == Mythology == === Radha Krishna === See also: [[Radha Krishna]] In the Braj region of India, where the Hindu deities Radha and Krishna grew up, the festival is celebrated until Rang Panchmi in commemoration of their divine love for each other. The festivities officially usher in spring, with Holi celebrated as a festival of love. ''Garga Samhita'', a puranic work by Sage Garga was the first work of literature to mention the romantic description of Radha and Krishna playing Holi. There is also a popular symbolic legend behind the festival. In his youth, Krishna despaired whether the fair-skinned Radha would like him because of his dark skin colour. His mother Yashoda, tired of his desperation, asks him to approach Radha and ask her to colour his face in any colour she wanted. This Radha did, and Radha and Krishna became a couple. Ever since, the playful colouring of Radha and Krishna's faces has been commemorated as Holi. Beyond India, these legends help to explain the significance of Holi (''Phagwah''), which is common in some Caribbean communities of Indian origin such as Guyana, Suriname, and Trinidad and Tobago. It is also celebrated with great fervour in Mauritius, Fiji, and South Africa. === Vishnu === Main article: [[Holika]] There is a symbolic legend found in the 7th chapter of the ''[[Bhagavata Purana]]'' explaining why Holi is celebrated as a festival of triumph of good over evil in the honour of Hindu god [[Vishnu]] and his devotee [[Prahlada]]. King [[Hiranyakashipu]], the father of Prahlada, was the king of demonic Asuras and had earned a boon that gave him five special powers: he could be killed by neither a human being nor an animal, neither indoors nor outdoors, neither at day nor at night, neither by ''astra'' (projectile weapons) nor by any ''shastra'' (handheld weapons), and neither on land nor in water or air. Hiranyakashipu grew arrogant, thought he was God, and demanded that everyone worship only him. Hiranyakashipu's own son, Prahlada, however, remained devoted to Vishnu. This infuriated Hiranyakashipu. He subjected Prahlada to cruel punishments, none of which affected the boy or his resolve to do what he thought was right. Finally, Holika, Prahlada's evil aunt, tricked him into sitting on a pyre with her. Holika was wearing a cloak that made her immune to injury from fire, while Prahlada was not. As the fire spread, the cloak flew from Holika and encased Prahlada, who survived while Holika burned. Vishnu, the god who appears as an avatar to restore Dharma in Hindu beliefs, took the form of [[Narasimha]] – half human and half lion (which is neither a human nor an animal), at dusk (when it was neither day nor night), took Hiranyakashyapu at a doorstep (which was neither indoors nor outdoors), placed him on his lap (which was neither land, water nor air), and then eviscerated and killed the king with his lion claws (which were neither a handheld weapon nor a launched weapon). The Holika bonfire and Holi signifies the celebration of the symbolic victory of good over evil, of Prahlada over Hiranyakashipu, and of the fire that burned Holika. === Kama and Rati === Among other Hindu traditions such as Shaivism and Shaktism, the legendary significance of Holi is linked to Shiva in yoga and deep meditation. Goddess Parvati wanting to bring Shiva back into the world, seeks help from the Hindu god of love called Kamadeva on Vasant Panchami. The love god shoots arrows at Shiva, the yogi opens his third eye and burns Kama to ashes. This upsets both Kama's wife Rati (''Kamadevi'') and his own wife ''Parvati''. ''Rati'' performs her own meditative asceticism for forty days, upon which Shiva understands, forgives out of compassion and restores the god of love. This return of the god of love, is celebrated on the 40th day after the Vasant Panchami festival as Holi. The Kama legend and its significance to Holi has many variant forms, particularly in South India. [[Category:Festivals of India]] 92ed0fc995d73e8f7d5569dafb509ff25b5f0737 1381 1380 2024-03-18T15:52:09Z 80.5.18.102 0 wikitext text/x-wiki <div style="float: right; border: 1px solid #aaa; margin-left: 20px; padding: 10px;"> {| class="infobox" style="width: 250px; font-size: 85%;" |+ '''Holi''' |- ! image | File:Holi 2023 07 30.jpg |- ! caption | Holi celebration in India |- ! also_known_as | Festival of Colors, Festival of Love |- ! type | Religious, cultural |- ! significance | Celebration of the arrival of spring, victory of good over evil, and love |- ! date | Full moon day of the Hindu lunisolar month of Phalguna (February–March) |- ! celebrations | Playing with colors (gulal), water guns (pichkaris), dancing, singing, bonfires (Holika Dahan) |- ! related_to | Holika Dahan, Rangwali Holi, Lathmar Holi, Dol Purnima, Basant Utsav |- ! observances | Prayers, throwing of colored powders and water, sharing of sweets, festive meals |- ! regions | Primarily observed in India and Nepal; also celebrated by Hindu communities worldwide |- ! significance | Celebration of the arrival of spring, victory of good over evil, and love |} </div> '''Holi''' (Hindi pronunciation: ['hoːli:]) is a popular and significant Hindu festival celebrated as the '''Festival of Colours''', '''Love''', and '''Spring'''. It celebrates the eternal and divine love of the deities Radha and Krishna. Additionally, the day signifies the triumph of good over evil, as it commemorates the victory of Vishnu as Narasimha over Hiranyakashipu. Holi originated and is predominantly celebrated in the Indian subcontinent, but has also spread to other regions of Asia and parts of the Western world through the Indian diaspora. Holi also celebrates the arrival of Spring in India, the end of winter, and the blossoming of love. It is also an invocation for a good spring harvest season. It lasts for a night and a day, starting on the evening of the Purnima (full moon day) falling on the Hindu calendar month of Phalguna, which falls around the middle of March in the Gregorian calendar. == Names == ''Holi'' (Hindi: होली, Gujarati: હોળી, Kannada: ಹೋಳಿ, Marathi: होळी, Nepali: होली, Punjabi: ਹੋਲੀ, Telugu: హోళి) is also known as ''Dol Jatra'' (swing festival") and ''Bôshonto Utshôb'' (Bengali: বসন্ত উৎসব) ("spring festival") in Bengal (West Bengal and Bangladesh), ''Dôl Jātrā'' (Assamese: দ’ল যাত্ৰা) in Assam, ''Phāgu Pūrṇimā'' (Nepali: फागु पूर्णिमा) in the hilly region of Nepal, ''Dola jātra'' (Odia: ଦୋଳଯାତ୍ରା) in Odisha, ''Fagua'' or ''Phagua'' (Bhojpuri: फगुआ) in eastern Uttar Pradesh, western Bihar, and northeastern Jharkhand, ''Phagwah'' (Caribbean Hindustani: पगवा) in the Caribbean (namely Trinidad and Tobago, Guyana, Suriname, and Jamaica), and ''Phagua'' (Fiji Hindi: पगवा) in Fiji. The main day of the celebration is known as "Holi", "Rangwali Holi", "Dol Purnima", "Dhuleti", "Dhulandi", "Ukuli", "Manjal Kuli", "Yaosang", "Shigmo", "Phagwah", or "Jajiri". == Description == Holi is a sacred ancient tradition of Hindus, a holiday in many states of India and Nepal with regional holidays in other countries. It is a cultural celebration that gives Hindus and non-Hindus alike an opportunity to have fun banter with other people by throwing coloured water and powder at each other. It is also observed broadly on the Indian subcontinent. Holi is celebrated at the end of winter, on the last full moon day of the Hindu luni-solar calendar month, marking the spring, making the date vary with the lunar cycle. The date falls typically in March, but sometimes late February of the Gregorian calendar. The festival has many purposes; most prominently, it celebrates the beginning of Spring. In 17th century literature, it was identified as a festival that celebrated agriculture, commemorated good spring harvests, and the fertile land. Hindus believe it is a time to enjoying spring's abundant colours and saying farewell to winter. To many Hindus, Holi festivities mark an occasion to reset and renew ruptured relationships, end conflicts, and rid themselves of accumulated emotional impurities from the past. It also has a religious purpose, symbolically signified by the legend of Holika. The night before Holi, bonfires are lit in a ceremony known as Holika Dahan (burning of Holika) or Little Holi. People gather near fires, sing and dance. The next day, Holi, also known as ''Dhuli'' in Sanskrit, or ''Dhulheti'', ''Dhulandi'' or ''Dhulendi'', is celebrated. In Northern parts of India, children and youth spray coloured powder solutions (''gulal'') at each other, laugh and celebrate, while adults smear dry coloured powder (''abir'') on each other's faces. Visitors to homes are first teased with colours, then served with Holi delicacies (such as ''gujia, shakkarpaare, matri, and dahi-bada''), desserts and drinks. After playing with colours, and cleaning up, people bathe, put on clean clothes, and visit friends and family. Like Holika Dahan, ''Kama Dahanam'' is celebrated in some parts of India. The festival of colours in these parts is called ''Rangapanchami'', and occurs on the fifth day after Poornima (full moon). == History == The Holi festival is an ancient Hindu festival with its own cultural rituals which emerged before the Gupta period. The festival of colours finds mentioned in numerous scriptures, such as in works like Jaimini's ''Purva Mimamsa Sutras'' and ''Kathaka-Grhya-Sutras'' with even more detailed descriptions in ancient texts like the ''Narada Purana'' and ''Bhavishya Purana''. The festival of ''"holikotsav"'' was also mentioned in the 7th century work, ''Ratnavali'', by King Harsha. It is mentioned in the ''Puranas'', ''Dasakumara Charita'' by Daṇḍin, and by the poet Kālidāsa during the 4th century reign of Chandragupta II. The celebration of Holi is also mentioned in the 7th-century Sanskrit drama ''Ratnavali''. The festival of Holi caught the fascination of European traders and British colonial staff by the 17th century. Various old editions of the Oxford English Dictionary mention it, but with varying, phonetically derived spellings: ''Houly'' (1687), ''Hooly'' (1698), ''Huli'' (1789), ''Hohlee'' (1809), ''Hoolee'' (1825), and ''Holi'' in editions published after 1910. == Mythology == === Radha Krishna === See also: [[Radha Krishna]] In the Braj region of India, where the Hindu deities Radha and Krishna grew up, the festival is celebrated until Rang Panchmi in commemoration of their divine love for each other. The festivities officially usher in spring, with Holi celebrated as a festival of love. ''Garga Samhita'', a puranic work by Sage Garga was the first work of literature to mention the romantic description of Radha and Krishna playing Holi. There is also a popular symbolic legend behind the festival. In his youth, Krishna despaired whether the fair-skinned Radha would like him because of his dark skin colour. His mother Yashoda, tired of his desperation, asks him to approach Radha and ask her to colour his face in any colour she wanted. This Radha did, and Radha and Krishna became a couple. Ever since, the playful colouring of Radha and Krishna's faces has been commemorated as Holi. Beyond India, these legends help to explain the significance of Holi (''Phagwah''), which is common in some Caribbean communities of Indian origin such as Guyana, Suriname, and Trinidad and Tobago. It is also celebrated with great fervour in Mauritius, Fiji, and South Africa. === Vishnu === Main article: [[Holika]] There is a symbolic legend found in the 7th chapter of the ''[[Bhagavata Purana]]'' explaining why Holi is celebrated as a festival of triumph of good over evil in the honour of Hindu god [[Vishnu]] and his devotee [[Prahlada]]. King [[Hiranyakashipu]], the father of Prahlada, was the king of demonic Asuras and had earned a boon that gave him five special powers: he could be killed by neither a human being nor an animal, neither indoors nor outdoors, neither at day nor at night, neither by ''astra'' (projectile weapons) nor by any ''shastra'' (handheld weapons), and neither on land nor in water or air. Hiranyakashipu grew arrogant, thought he was God, and demanded that everyone worship only him. Hiranyakashipu's own son, Prahlada, however, remained devoted to Vishnu. This infuriated Hiranyakashipu. He subjected Prahlada to cruel punishments, none of which affected the boy or his resolve to do what he thought was right. Finally, Holika, Prahlada's evil aunt, tricked him into sitting on a pyre with her. Holika was wearing a cloak that made her immune to injury from fire, while Prahlada was not. As the fire spread, the cloak flew from Holika and encased Prahlada, who survived while Holika burned. Vishnu, the god who appears as an avatar to restore Dharma in Hindu beliefs, took the form of [[Narasimha]] – half human and half lion (which is neither a human nor an animal), at dusk (when it was neither day nor night), took Hiranyakashyapu at a doorstep (which was neither indoors nor outdoors), placed him on his lap (which was neither land, water nor air), and then eviscerated and killed the king with his lion claws (which were neither a handheld weapon nor a launched weapon). The Holika bonfire and Holi signifies the celebration of the symbolic victory of good over evil, of Prahlada over Hiranyakashipu, and of the fire that burned Holika. === Kama and Rati === Among other Hindu traditions such as Shaivism and Shaktism, the legendary significance of Holi is linked to Shiva in yoga and deep meditation. Goddess Parvati wanting to bring Shiva back into the world, seeks help from the Hindu god of love called Kamadeva on Vasant Panchami. The love god shoots arrows at Shiva, the yogi opens his third eye and burns Kama to ashes. This upsets both Kama's wife Rati (''Kamadevi'') and his own wife ''Parvati''. ''Rati'' performs her own meditative asceticism for forty days, upon which Shiva understands, forgives out of compassion and restores the god of love. This return of the god of love, is celebrated on the 40th day after the Vasant Panchami festival as Holi. The Kama legend and its significance to Holi has many variant forms, particularly in South India. [[Category:Festivals of India]] e97f7146f7351b367cfcb9ab44106c4ed73862bf Category:Festivals of India 14 675 1382 2024-03-18T15:53:15Z 80.5.18.102 0 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709